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
password, SUN_LDAP_POOLING_FLAG, userDn
Constructor and Description |
---|
PasswordPolicyAwareContextSource(String providerUrl) |
Modifier and Type | Method and Description |
---|---|
protected Hashtable |
getAuthenticatedEnv(String principal,
String credentials) |
DirContext |
getContext(String principal,
String credentials) |
getDirContextInstance
afterPropertiesSet, assembleProviderUrlString, createContext, getAnonymousEnv, getAuthenticationSource, getBase, getBaseLdapPath, getBaseLdapPathAsString, getContextFactory, getDirObjectFactory, getReadOnlyContext, getReadWriteContext, getUrls, isAnonymousReadOnly, isPooled, setAnonymousReadOnly, setAuthenticationSource, setAuthenticationStrategy, setBase, setBaseEnvironmentProperties, setCacheEnvironmentProperties, setContextFactory, setDirObjectFactory, setPassword, setPooled, setReferral, setupAuthenticatedEnvironment, setUrl, setUrls, setUserDn
public PasswordPolicyAwareContextSource(String providerUrl)
public DirContext getContext(String principal, String credentials) throws PasswordPolicyException
getContext
in interface ContextSource
getContext
in class AbstractContextSource
PasswordPolicyException
protected Hashtable getAuthenticatedEnv(String principal, String credentials)
getAuthenticatedEnv
in class AbstractContextSource