org.springframework.security.ldap.ppolicy
Class PasswordPolicyAwareContextSource
java.lang.Object
org.springframework.ldap.core.support.AbstractContextSource
org.springframework.ldap.core.support.LdapContextSource
org.springframework.security.ldap.DefaultSpringSecurityContextSource
org.springframework.security.ldap.ppolicy.PasswordPolicyAwareContextSource
- All Implemented Interfaces:
- InitializingBean, ContextSource, BaseLdapPathContextSource, BaseLdapPathSource
public class PasswordPolicyAwareContextSource
- extends DefaultSpringSecurityContextSource
Extended version of the DefaultSpringSecurityContextSource which adds support for
the use of 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.
- Since:
- 3.0
Methods inherited from class org.springframework.ldap.core.support.AbstractContextSource |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PasswordPolicyAwareContextSource
public PasswordPolicyAwareContextSource(String providerUrl)
getContext
public DirContext getContext(String principal,
String credentials)
throws PasswordPolicyException
- Specified by:
getContext
in interface ContextSource
- Overrides:
getContext
in class AbstractContextSource
- Throws:
PasswordPolicyException
getAuthenticatedEnv
protected Hashtable getAuthenticatedEnv(String principal,
String credentials)
- Overrides:
getAuthenticatedEnv
in class AbstractContextSource