public class PasswordPolicyAwareContextSource extends DefaultSpringSecurityContextSource
PasswordPolicyControl to make use of user account data stored in
the directory.
When binding with specific username (not the userDn) property it will connect first as the userDn, then reconnect as the user in order to retrieve any password-policy control sent with the response, even if an exception occurs.
logger| Constructor and Description |
|---|
PasswordPolicyAwareContextSource(java.lang.String providerUrl) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Hashtable |
getAuthenticatedEnv(java.lang.String principal,
java.lang.String credentials) |
javax.naming.directory.DirContext |
getContext(java.lang.String principal,
java.lang.String credentials) |
getDirContextInstanceafterPropertiesSet, assembleProviderUrlString, createContext, getAnonymousEnv, getAuthenticationSource, getBaseLdapName, getBaseLdapPath, getBaseLdapPathAsString, getContextFactory, getDirObjectFactory, getPassword, getReadOnlyContext, getReadWriteContext, getUrls, getUserDn, isAnonymousReadOnly, isPooled, setAnonymousReadOnly, setAuthenticationSource, setAuthenticationStrategy, setBase, setBaseEnvironmentProperties, setCacheEnvironmentProperties, setContextFactory, setDirObjectFactory, setPassword, setPooled, setReferral, setupAuthenticatedEnvironment, setUrl, setUrls, setUserDnpublic PasswordPolicyAwareContextSource(java.lang.String providerUrl)
public javax.naming.directory.DirContext getContext(java.lang.String principal,
java.lang.String credentials)
throws PasswordPolicyException
getContext in interface org.springframework.ldap.core.ContextSourcegetContext in class org.springframework.ldap.core.support.AbstractContextSourcePasswordPolicyExceptionprotected java.util.Hashtable getAuthenticatedEnv(java.lang.String principal,
java.lang.String credentials)
getAuthenticatedEnv in class org.springframework.ldap.core.support.AbstractContextSource