org.jasig.schedassist.web.security
Class CustomLDAPAuthenticationProvider
java.lang.Object
org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
org.springframework.security.authentication.dao.DaoAuthenticationProvider
org.jasig.schedassist.web.security.CustomLDAPAuthenticationProvider
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean, org.springframework.context.MessageSourceAware, org.springframework.security.authentication.AuthenticationProvider
public class CustomLDAPAuthenticationProvider
- extends org.springframework.security.authentication.dao.DaoAuthenticationProvider
This subclass of DaoAuthenticationProvider is intended to provide
better integration for LDAP-sourced calendar accounts with Spring Security and
the CalendarUserDetailsServiceImpl.
Spring Security's LDAP support will only return their custom LDAP UserDetails
implementation. That is not satisfactory for use within this application, as we have
an extension (CalendarAccountUserDetails that must be returned.
Instead of sub-classing Spring Security's LDAP AuthenticationProvider implementation,
this class sub-classes DaoAuthenticationProvider to borrow it's tight integration
with the UserDetailsService.
- Version:
- $ Id: CustomLDAPAuthenticationProvider.java $
- Author:
- Nicholas Blair
| Fields inherited from class org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider |
hideUserNotFoundExceptions, logger, messages |
|
Method Summary |
protected void |
additionalAuthenticationChecks(org.springframework.security.core.userdetails.UserDetails userDetails,
org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication)
Incorporates some of the
(non-Javadoc) |
org.springframework.security.ldap.authentication.LdapAuthenticator |
getAuthenticator()
|
void |
setAuthenticator(org.springframework.security.ldap.authentication.LdapAuthenticator authenticator)
|
| Methods inherited from class org.springframework.security.authentication.dao.DaoAuthenticationProvider |
doAfterPropertiesSet, getPasswordEncoder, getSaltSource, getUserDetailsService, isIncludeDetailsObject, retrieveUser, setIncludeDetailsObject, setPasswordEncoder, setSaltSource, setUserDetailsService |
| Methods inherited from class org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider |
afterPropertiesSet, authenticate, createSuccessAuthentication, getPostAuthenticationChecks, getPreAuthenticationChecks, getUserCache, isForcePrincipalAsString, isHideUserNotFoundExceptions, setForcePrincipalAsString, setHideUserNotFoundExceptions, setMessageSource, setPostAuthenticationChecks, setPreAuthenticationChecks, setUserCache, supports |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CustomLDAPAuthenticationProvider
public CustomLDAPAuthenticationProvider()
getAuthenticator
public org.springframework.security.ldap.authentication.LdapAuthenticator getAuthenticator()
- Returns:
- the ldapAuthenticator
setAuthenticator
public void setAuthenticator(org.springframework.security.ldap.authentication.LdapAuthenticator authenticator)
- Parameters:
authenticator - the ldap authenticator to set
additionalAuthenticationChecks
protected void additionalAuthenticationChecks(org.springframework.security.core.userdetails.UserDetails userDetails,
org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication)
throws org.springframework.security.core.AuthenticationException
- Incorporates some of the
(non-Javadoc)
- Overrides:
additionalAuthenticationChecks in class org.springframework.security.authentication.dao.DaoAuthenticationProvider
- Throws:
org.springframework.security.core.AuthenticationException- See Also:
DaoAuthenticationProvider.additionalAuthenticationChecks(org.springframework.security.core.userdetails.UserDetails, org.springframework.security.authentication.UsernamePasswordAuthenticationToken)
Copyright © 2011 Jasig. All Rights Reserved.