java.lang.Object |
↳ |
org.springframework.security.web.authentication.preauth.j2ee.J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource |
Class Overview
Implementation of AuthenticationDetailsSource which converts the user's J2EE roles (as obtained by calling
isUserInRole(String)
) into GrantedAuthority
s and stores these in the authentication
details object.
Summary
Protected Methods |
Collection<String>
|
getUserRoles(HttpServletRequest request)
Obtains the list of user roles based on the current user's JEE roles.
|
Fields
protected
Set<String>
j2eeMappableRoles
The role attributes returned by the configured MappableAttributesRetriever
protected
final
Log
logger
Public Constructors
public
J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource
()
Public Methods
public
void
afterPropertiesSet
()
Check that all required properties have been set.
Builds the authentication details object.
public
void
setMappableRolesRetriever
(MappableAttributesRetriever aJ2eeMappableRolesRetriever)
Parameters
aJ2eeMappableRolesRetriever
| The MappableAttributesRetriever to use
|
Parameters
mapper
| The Attributes2GrantedAuthoritiesMapper to use
|
Protected Methods
protected
Collection<String>
getUserRoles
(HttpServletRequest request)
Obtains the list of user roles based on the current user's JEE roles. The
isUserInRole(String)
method is called for each of the values
in the j2eeMappableRoles
set to determine if that role should be assigned to the user.
Parameters
request
| the request which should be used to extract the user's roles. |
Returns
- The subset of
j2eeMappableRoles
which applies to the current user making the request.