|
spring-security-ldap | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider
public abstract class AbstractLdapAuthenticationProvider
Base class for the standard LdapAuthenticationProvider and the
ActiveDirectoryLdapAuthenticationProvider.
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
logger
|
protected MessageSourceAccessor |
messages
|
protected UserDetailsContextMapper |
userDetailsContextMapper
|
| Constructor Summary | |
|---|---|
AbstractLdapAuthenticationProvider()
|
|
| Method Summary | |
|---|---|
org.springframework.security.core.Authentication |
authenticate(org.springframework.security.core.Authentication authentication)
|
protected org.springframework.security.core.Authentication |
createSuccessfulAuthentication(org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication,
org.springframework.security.core.userdetails.UserDetails user)
Creates the final Authentication object which will be returned from the authenticate method. |
protected abstract DirContextOperations |
doAuthentication(org.springframework.security.authentication.UsernamePasswordAuthenticationToken auth)
|
protected UserDetailsContextMapper |
getUserDetailsContextMapper()
Provides access to the injected UserDetailsContextMapper strategy for use by subclasses. |
protected abstract Collection<? extends org.springframework.security.core.GrantedAuthority> |
loadUserAuthorities(DirContextOperations userData,
String username,
String password)
|
void |
setAuthoritiesMapper(org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper authoritiesMapper)
|
void |
setMessageSource(MessageSource messageSource)
|
void |
setUseAuthenticationRequestCredentials(boolean useAuthenticationRequestCredentials)
Determines whether the supplied password will be used as the credentials in the successful authentication token. |
void |
setUserDetailsContextMapper(UserDetailsContextMapper userDetailsContextMapper)
Allows a custom strategy to be used for creating the UserDetails which will be stored as the principal in the Authentication returned by the createSuccessfulAuthentication(org.springframework.security.authentication.UsernamePasswordAuthenticationToken, org.springframework.security.core.userdetails.UserDetails) method. |
boolean |
supports(Class<?> authentication)
|
| 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
protected MessageSourceAccessor messages
protected UserDetailsContextMapper userDetailsContextMapper
| Constructor Detail |
|---|
public AbstractLdapAuthenticationProvider()
| Method Detail |
|---|
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication)
throws org.springframework.security.core.AuthenticationException
authenticate in interface org.springframework.security.authentication.AuthenticationProviderorg.springframework.security.core.AuthenticationExceptionprotected abstract DirContextOperations doAuthentication(org.springframework.security.authentication.UsernamePasswordAuthenticationToken auth)
protected abstract Collection<? extends org.springframework.security.core.GrantedAuthority> loadUserAuthorities(DirContextOperations userData,
String username,
String password)
protected org.springframework.security.core.Authentication createSuccessfulAuthentication(org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication,
org.springframework.security.core.userdetails.UserDetails user)
Authentication object which will be returned from the authenticate method.
authentication - the original authentication request tokenuser - the UserDetails instance returned by the configured UserDetailsContextMapper.
public boolean supports(Class<?> authentication)
supports in interface org.springframework.security.authentication.AuthenticationProviderpublic void setUseAuthenticationRequestCredentials(boolean useAuthenticationRequestCredentials)
UserDetailsContextMapper.
Often it will not be possible to read the password from the directory, so defaults to true.
useAuthenticationRequestCredentials - public void setMessageSource(MessageSource messageSource)
setMessageSource in interface MessageSourceAwarepublic void setAuthoritiesMapper(org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper authoritiesMapper)
public void setUserDetailsContextMapper(UserDetailsContextMapper userDetailsContextMapper)
createSuccessfulAuthentication(org.springframework.security.authentication.UsernamePasswordAuthenticationToken, org.springframework.security.core.userdetails.UserDetails) method.
userDetailsContextMapper - the strategy instance. If not set, defaults to a simple
LdapUserDetailsMapper.protected UserDetailsContextMapper getUserDetailsContextMapper()
UserDetailsContextMapper strategy for use by subclasses.
|
spring-security-ldap | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||