Interface LDAPInitialDirContextFactory

  • All Known Implementing Classes:
    LDAPInitialDirContextFactoryImpl

    public interface LDAPInitialDirContextFactory
    Interface that defines a factory for obtaining ldap directory contexts.
    Author:
    Andy Hind
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      javax.naming.directory.InitialDirContext getDefaultIntialDirContext()
      Use the environment properties and connect to the LDAP server.
      javax.naming.directory.InitialDirContext getDefaultIntialDirContext​(int pageSize)
      Use the environment properties and connect to the LDAP server, optionally configuring RFC 2696 paged results.
      javax.naming.directory.InitialDirContext getDefaultIntialDirContext​(int pageSize, org.alfresco.repo.security.authentication.AuthenticationDiagnostic diagnostic)
      Use the environment properties and connect to the LDAP server, optionally configuring RFC 2696 paged results.
      javax.naming.directory.InitialDirContext getDefaultIntialDirContext​(org.alfresco.repo.security.authentication.AuthenticationDiagnostic diagnostic)
      Use the environment properties and connect to the LDAP server.
      javax.naming.directory.InitialDirContext getInitialDirContext​(java.lang.String principal, java.lang.String credentials)
      Augment the connection environment with the identity and credentials and bind to the ldap server.
      javax.naming.directory.InitialDirContext getInitialDirContext​(java.lang.String principal, java.lang.String credentials, org.alfresco.repo.security.authentication.AuthenticationDiagnostic diagnostic)
      Augment the connection environment with the identity and credentials and bind to the ldap server.
      boolean hasNextPage​(javax.naming.directory.DirContext ctx, int pageSize)
      Determines whether there is another page to fetch from the last search to be run in this context.
      void setInitialDirContextEnvironment​(java.util.Map<java.lang.String,​java.lang.String> environment)
      Set the LDAP environment Hashtable properties used ot initialise the LDAP connection.
    • Method Detail

      • setInitialDirContextEnvironment

        void setInitialDirContextEnvironment​(java.util.Map<java.lang.String,​java.lang.String> environment)
        Set the LDAP environment Hashtable properties used ot initialise the LDAP connection.
      • getDefaultIntialDirContext

        javax.naming.directory.InitialDirContext getDefaultIntialDirContext​(int pageSize,
                                                                            org.alfresco.repo.security.authentication.AuthenticationDiagnostic diagnostic)
                                                                     throws org.alfresco.repo.security.authentication.AuthenticationException
        Use the environment properties and connect to the LDAP server, optionally configuring RFC 2696 paged results. Used to obtain read only access to the LDAP server.
        Parameters:
        pageSize - if a positive value, indicates that a LDAP v3 RFC 2696 paged results control should be used. The results of a search operation should be returned by the LDAP server in batches of the specified size.
        diagnostic - AuthenticationDiagnostic
        Returns:
        the default intial dir context
        Throws:
        org.alfresco.repo.security.authentication.AuthenticationException - the authentication exception
      • getDefaultIntialDirContext

        javax.naming.directory.InitialDirContext getDefaultIntialDirContext​(int pageSize)
                                                                     throws org.alfresco.repo.security.authentication.AuthenticationException
        Use the environment properties and connect to the LDAP server, optionally configuring RFC 2696 paged results. Used to obtain read only access to the LDAP server.
        Parameters:
        pageSize - if a positive value, indicates that a LDAP v3 RFC 2696 paged results control should be used. The results of a search operation should be returned by the LDAP server in batches of the specified size.
        Returns:
        the default intial dir context
        Throws:
        org.alfresco.repo.security.authentication.AuthenticationException - the authentication exception
      • getDefaultIntialDirContext

        javax.naming.directory.InitialDirContext getDefaultIntialDirContext()
                                                                     throws org.alfresco.repo.security.authentication.AuthenticationException
        Use the environment properties and connect to the LDAP server. Used to obtain read only access to the LDAP server.
        Returns:
        InitialDirContext
        Throws:
        org.alfresco.repo.security.authentication.AuthenticationException
      • getDefaultIntialDirContext

        javax.naming.directory.InitialDirContext getDefaultIntialDirContext​(org.alfresco.repo.security.authentication.AuthenticationDiagnostic diagnostic)
                                                                     throws org.alfresco.repo.security.authentication.AuthenticationException
        Use the environment properties and connect to the LDAP server. Used to obtain read only access to the LDAP server.
        Returns:
        InitialDirContext
        Throws:
        org.alfresco.repo.security.authentication.AuthenticationException
      • hasNextPage

        boolean hasNextPage​(javax.naming.directory.DirContext ctx,
                            int pageSize)
        Determines whether there is another page to fetch from the last search to be run in this context. Also prepares the request controls so that the appropriate cookie will be passed in the next search.
        Parameters:
        ctx - the context
        pageSize - if a positive value, indicates that a LDAP v3 RFC 2696 paged results control should be used. The results of a search operation should be returned by the LDAP server in batches of the specified size.
        Returns:
        true, if is ready for next page
      • getInitialDirContext

        javax.naming.directory.InitialDirContext getInitialDirContext​(java.lang.String principal,
                                                                      java.lang.String credentials)
                                                               throws org.alfresco.repo.security.authentication.AuthenticationException
        Augment the connection environment with the identity and credentials and bind to the ldap server. Mainly used to validate a user's credentials during authentication.
        Parameters:
        principal - String
        credentials - String
        Returns:
        InitialDirContext
        Throws:
        org.alfresco.repo.security.authentication.AuthenticationException
      • getInitialDirContext

        javax.naming.directory.InitialDirContext getInitialDirContext​(java.lang.String principal,
                                                                      java.lang.String credentials,
                                                                      org.alfresco.repo.security.authentication.AuthenticationDiagnostic diagnostic)
                                                               throws org.alfresco.repo.security.authentication.AuthenticationException
        Augment the connection environment with the identity and credentials and bind to the ldap server. Mainly used to validate a user's credentials during authentication.
        Parameters:
        principal - String
        credentials - String
        diagnostic - AuthenticationDiagnostic
        Returns:
        InitialDirContext
        Throws:
        org.alfresco.repo.security.authentication.AuthenticationException