|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.ldap.core.support.AbstractContextSource org.springframework.ldap.core.support.LdapContextSource org.springframework.security.ldap.DefaultSpringSecurityContextSource
public class DefaultSpringSecurityContextSource
ContextSource implementation which uses Spring LDAP's LdapContextSource as a base class. Used internally by the Spring Security LDAP namespace configuration.
From Spring Security 2.5, Spring LDAP 1.3 is used and the ContextSource interface provides support for binding with a username and password. As a result, Spring LDAP ContextSource implementations such as LdapContextSource may be used directly with Spring Security.
Spring LDAP 1.3 doesn't have JVM-level LDAP connection pooling enabled by default. This class sets the
pooled property to true, but customizes the DirContextAuthenticationStrategy
used to disable
pooling when the DN doesn't match the userDn property. This prevents pooling for calls
to AbstractContextSource.getContext(String, String)
to authenticate as specific users.
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
logger
|
Fields inherited from class org.springframework.ldap.core.support.AbstractContextSource |
---|
password, SUN_LDAP_POOLING_FLAG, userDn |
Constructor Summary | |
---|---|
DefaultSpringSecurityContextSource(String providerUrl)
Create and initialize an instance which will connect to the supplied LDAP URL. |
Method Summary |
---|
Methods inherited from class org.springframework.ldap.core.support.LdapContextSource |
---|
getDirContextInstance |
Methods inherited from class org.springframework.ldap.core.support.AbstractContextSource |
---|
afterPropertiesSet, assembleProviderUrlString, createContext, getAnonymousEnv, getAuthenticatedEnv, getAuthenticationSource, getBase, getBaseLdapPath, getBaseLdapPathAsString, getContext, 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 |
Field Detail |
---|
protected final org.apache.commons.logging.Log logger
Constructor Detail |
---|
public DefaultSpringSecurityContextSource(String providerUrl)
providerUrl
- an LDAP URL of the form ldap://localhost:389/base_dn
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |