org.springframework.security.cas.userdetails
Class AbstractCasAssertionUserDetailsService

java.lang.Object
  extended by org.springframework.security.cas.userdetails.AbstractCasAssertionUserDetailsService
All Implemented Interfaces:
AuthenticationUserDetailsService
Direct Known Subclasses:
GrantedAuthorityFromAssertionAttributesUserDetailsService

public abstract class AbstractCasAssertionUserDetailsService
extends Object
implements AuthenticationUserDetailsService

Abstract class for using the provided CAS assertion to construct a new User object. This generally is most useful when combined with a SAML-based response from the CAS Server/client.

Since:
3.0

Constructor Summary
AbstractCasAssertionUserDetailsService()
           
 
Method Summary
protected abstract  UserDetails loadUserDetails(org.jasig.cas.client.validation.Assertion assertion)
          Protected template method for construct a UserDetails via the supplied CAS assertion.
 UserDetails loadUserDetails(Authentication token)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCasAssertionUserDetailsService

public AbstractCasAssertionUserDetailsService()
Method Detail

loadUserDetails

public final UserDetails loadUserDetails(Authentication token)
                                  throws UsernameNotFoundException
Specified by:
loadUserDetails in interface AuthenticationUserDetailsService
Parameters:
token - The pre-authenticated authentication token
Returns:
UserDetails for the given authentication token, never null.
Throws:
UsernameNotFoundException - if no user details can be found for the given authentication token

loadUserDetails

protected abstract UserDetails loadUserDetails(org.jasig.cas.client.validation.Assertion assertion)
Protected template method for construct a UserDetails via the supplied CAS assertion.

Parameters:
assertion - the assertion to use to construct the new UserDetails. CANNOT be NULL.
Returns:
the newly constructed UserDetails.