Class LDAPInitialDirContextFactoryImpl
java.lang.Object
org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactoryImpl
- All Implemented Interfaces:
LDAPInitialDirContextFactory,org.springframework.beans.factory.InitializingBean
public class LDAPInitialDirContextFactoryImpl
extends Object
implements LDAPInitialDirContextFactory, org.springframework.beans.factory.InitializingBean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidUse the environment properties and connect to the LDAP server.getDefaultIntialDirContext(int pageSize) Use the environment properties and connect to the LDAP server, optionally configuring RFC 2696 paged results.getDefaultIntialDirContext(int pageSize, AuthenticationDiagnostic diagnostic) Use the environment properties and connect to the LDAP server, optionally configuring RFC 2696 paged results.getDefaultIntialDirContext(AuthenticationDiagnostic diagnostic) Use the environment properties and connect to the LDAP server.getInitialDirContext(String principal, String credentials) Augment the connection environment with the identity and credentials and bind to the ldap server.getInitialDirContext(String principal, String credentials, AuthenticationDiagnostic diagnostic) Augment the connection environment with the identity and credentials and bind to the ldap server.booleanhasNextPage(DirContext ctx, int pageSize) Determines whether there is another page to fetch from the last search to be run in this context.static voidvoidsetDefaultIntialDirContextEnvironment(Map<String, String> defaultEnvironment) voidsetInitialChecksEnabled(boolean initialChecksEnabled) voidsetInitialDirContextEnvironment(Map<String, String> initialDirContextEnvironment) Set the LDAP environment Hashtable properties used ot initialise the LDAP connection.voidsetLdapInitialDirContextCache(SimpleCache<String, Set<Map<String, String>>> cache) voidsetPoolSystemProperties(Map<String, String> poolSystemProperties) voidsetTrustStorePassPhrase(String trustStorePassPhrase) voidsetTrustStorePath(String trustStorePath) voidsetTrustStoreType(String trustStoreType)
-
Constructor Details
-
LDAPInitialDirContextFactoryImpl
public LDAPInitialDirContextFactoryImpl()
-
-
Method Details
-
getTrustStorePath
-
setTrustStorePath
-
getTrustStoreType
-
setTrustStoreType
-
getTrustStorePassPhrase
-
setTrustStorePassPhrase
-
setInitialDirContextEnvironment
Description copied from interface:LDAPInitialDirContextFactorySet the LDAP environment Hashtable properties used ot initialise the LDAP connection.- Specified by:
setInitialDirContextEnvironmentin interfaceLDAPInitialDirContextFactory
-
getInitialDirContextEnvironment
-
setDefaultIntialDirContextEnvironment
-
getDefaultIntialDirContext
Description copied from interface:LDAPInitialDirContextFactoryUse the environment properties and connect to the LDAP server. Used to obtain read only access to the LDAP server.- Specified by:
getDefaultIntialDirContextin interfaceLDAPInitialDirContextFactory- Returns:
- InitialDirContext
- Throws:
AuthenticationException
-
setPoolSystemProperties
-
getDefaultIntialDirContext
Description copied from interface:LDAPInitialDirContextFactoryUse 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.- Specified by:
getDefaultIntialDirContextin interfaceLDAPInitialDirContextFactory- 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:
AuthenticationException- the authentication exception
-
getDefaultIntialDirContext
public InitialDirContext getDefaultIntialDirContext(AuthenticationDiagnostic diagnostic) throws AuthenticationException Description copied from interface:LDAPInitialDirContextFactoryUse the environment properties and connect to the LDAP server. Used to obtain read only access to the LDAP server.- Specified by:
getDefaultIntialDirContextin interfaceLDAPInitialDirContextFactory- Returns:
- InitialDirContext
- Throws:
AuthenticationException
-
getDefaultIntialDirContext
public InitialDirContext getDefaultIntialDirContext(int pageSize, AuthenticationDiagnostic diagnostic) throws AuthenticationException Description copied from interface:LDAPInitialDirContextFactoryUse 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.- Specified by:
getDefaultIntialDirContextin interfaceLDAPInitialDirContextFactory- 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:
AuthenticationException- the authentication exception
-
hasNextPage
Description copied from interface:LDAPInitialDirContextFactoryDetermines 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.- Specified by:
hasNextPagein interfaceLDAPInitialDirContextFactory- Parameters:
ctx- the contextpageSize- 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
public InitialDirContext getInitialDirContext(String principal, String credentials) throws AuthenticationException Description copied from interface:LDAPInitialDirContextFactoryAugment the connection environment with the identity and credentials and bind to the ldap server. Mainly used to validate a user's credentials during authentication.- Specified by:
getInitialDirContextin interfaceLDAPInitialDirContextFactory- Parameters:
principal- Stringcredentials- String- Returns:
- InitialDirContext
- Throws:
AuthenticationException
-
getInitialDirContext
public InitialDirContext getInitialDirContext(String principal, String credentials, AuthenticationDiagnostic diagnostic) throws AuthenticationException Description copied from interface:LDAPInitialDirContextFactoryAugment the connection environment with the identity and credentials and bind to the ldap server. Mainly used to validate a user's credentials during authentication.- Specified by:
getInitialDirContextin interfaceLDAPInitialDirContextFactory- Parameters:
principal- Stringcredentials- Stringdiagnostic- AuthenticationDiagnostic- Returns:
- InitialDirContext
- Throws:
AuthenticationException
-
main
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
setLdapInitialDirContextCache
-
setInitialChecksEnabled
public void setInitialChecksEnabled(boolean initialChecksEnabled)
-