|
Spring Security Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.providers.preauth.PreAuthenticatedGrantedAuthoritiesUserDetailsService
public class PreAuthenticatedGrantedAuthoritiesUserDetailsService
This AuthenticationUserDetailsService implementation creates a UserDetails object based solely on the information contained in the given PreAuthenticatedAuthenticationToken. The user name is set to the name as returned by PreAuthenticatedAuthenticationToken.getName(), the password is set to a fixed dummy value (it will not be used by the PreAuthenticatedAuthenticationProvider anyway), and the Granted Authorities are retrieved from the details object as returned by PreAuthenticatedAuthenticationToken.getDetails().
The details object as returned by PreAuthenticatedAuthenticationToken.getDetails() must implement the
GrantedAuthoritiesContainer
interface for this implementation to work.
Constructor Summary | |
---|---|
PreAuthenticatedGrantedAuthoritiesUserDetailsService()
|
Method Summary | |
---|---|
protected UserDetails |
createuserDetails(Authentication token,
GrantedAuthority[] authorities)
Creates the final UserDetails object. |
UserDetails |
loadUserDetails(Authentication token)
Get a UserDetails object based on the user name contained in the given token, and the GrantedAuthorities as returned by the GrantedAuthoritiesContainer implementation as returned by the token.getDetails() method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PreAuthenticatedGrantedAuthoritiesUserDetailsService()
Method Detail |
---|
public final UserDetails loadUserDetails(Authentication token) throws AuthenticationException
loadUserDetails
in interface AuthenticationUserDetailsService
token
- The pre-authenticated authentication token
UsernameNotFoundException
- if no user details can be found for the given authentication
token
AuthenticationException
protected UserDetails createuserDetails(Authentication token, GrantedAuthority[] authorities)
token
- the authentication request tokenauthorities
- the pre-authenticated authorities.
|
Spring Security Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |