Class LookupAttemptingCallback
- java.lang.Object
-
- org.springframework.ldap.core.support.LookupAttemptingCallback
-
- All Implemented Interfaces:
AuthenticatedLdapEntryContextCallback,AuthenticatedLdapEntryContextMapper<DirContextOperations>
public class LookupAttemptingCallback extends java.lang.Object implements AuthenticatedLdapEntryContextCallback, AuthenticatedLdapEntryContextMapper<DirContextOperations>
Attempts to perform an LDAP operation in the authenticated context, because Active Directory might allow bind with incorrect password (specifically empty password), and later refuse operations. We want to fail fast when authenticating.mapWithContext(javax.naming.directory.DirContext, org.springframework.ldap.core.LdapEntryIdentification)returns theDirContextOperationsinstance that results from the lookup operation. This instance can be used to obtain information regarding the authenticated user.- Since:
- 1.3.1
-
-
Constructor Summary
Constructors Constructor Description LookupAttemptingCallback()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecuteWithContext(javax.naming.directory.DirContext ctx, LdapEntryIdentification ldapEntryIdentification)Perform some LDAP operation on the supplied authenticatedDirContextinstance.DirContextOperationsmapWithContext(javax.naming.directory.DirContext ctx, LdapEntryIdentification ldapEntryIdentification)Perform some LDAP operation on the supplied authenticatedDirContextinstance.
-
-
-
Method Detail
-
executeWithContext
public void executeWithContext(javax.naming.directory.DirContext ctx, LdapEntryIdentification ldapEntryIdentification)Description copied from interface:AuthenticatedLdapEntryContextCallbackPerform some LDAP operation on the supplied authenticatedDirContextinstance. The target context will be automatically closed.- Specified by:
executeWithContextin interfaceAuthenticatedLdapEntryContextCallback- Parameters:
ctx- theDirContextinstance to perform an operation on.ldapEntryIdentification- the identification of the LDAP entry used to authenticate the suppliedDirContext.
-
mapWithContext
public DirContextOperations mapWithContext(javax.naming.directory.DirContext ctx, LdapEntryIdentification ldapEntryIdentification)
Description copied from interface:AuthenticatedLdapEntryContextMapperPerform some LDAP operation on the supplied authenticatedDirContextinstance. The target context will be automatically closed.- Specified by:
mapWithContextin interfaceAuthenticatedLdapEntryContextMapper<DirContextOperations>- Parameters:
ctx- theDirContextinstance to perform an operation on.ldapEntryIdentification- the identification of the LDAP entry used to authenticate the suppliedDirContext.- Returns:
- the result of the operation, if any.
-
-