public class J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource extends Object implements org.springframework.security.authentication.AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails>, InitializingBean
HttpServletRequest.isUserInRole(String)) into
GrantedAuthoritys and stores these in the authentication details object.| Modifier and Type | Field and Description |
|---|---|
protected Set<String> |
j2eeMappableRoles
The role attributes returned by the configured
MappableAttributesRetriever |
protected org.springframework.security.core.authority.mapping.Attributes2GrantedAuthoritiesMapper |
j2eeUserRoles2GrantedAuthoritiesMapper |
protected org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Check that all required properties have been set.
|
PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails |
buildDetails(javax.servlet.http.HttpServletRequest context)
Builds the authentication details object.
|
protected Collection<String> |
getUserRoles(javax.servlet.http.HttpServletRequest request)
Obtains the list of user roles based on the current user's JEE roles.
|
void |
setMappableRolesRetriever(org.springframework.security.core.authority.mapping.MappableAttributesRetriever aJ2eeMappableRolesRetriever) |
void |
setUserRoles2GrantedAuthoritiesMapper(org.springframework.security.core.authority.mapping.Attributes2GrantedAuthoritiesMapper mapper) |
protected final org.apache.commons.logging.Log logger
protected Set<String> j2eeMappableRoles
MappableAttributesRetrieverprotected org.springframework.security.core.authority.mapping.Attributes2GrantedAuthoritiesMapper j2eeUserRoles2GrantedAuthoritiesMapper
public J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource()
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionprotected Collection<String> getUserRoles(javax.servlet.http.HttpServletRequest request)
HttpServletRequest.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.request - the request which should be used to extract the user's roles.j2eeMappableRoles which applies to the current user
making the request.public PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails buildDetails(javax.servlet.http.HttpServletRequest context)
buildDetails in interface org.springframework.security.authentication.AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails>AuthenticationDetailsSource.buildDetails(Object)public void setMappableRolesRetriever(org.springframework.security.core.authority.mapping.MappableAttributesRetriever aJ2eeMappableRolesRetriever)
aJ2eeMappableRolesRetriever - The MappableAttributesRetriever to usepublic void setUserRoles2GrantedAuthoritiesMapper(org.springframework.security.core.authority.mapping.Attributes2GrantedAuthoritiesMapper mapper)
mapper - The Attributes2GrantedAuthoritiesMapper to use