|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.web.authentication.preauth.j2ee.J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource
public class J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource
Implementation of AuthenticationDetailsSource which converts the user's J2EE roles (as obtained by calling
HttpServletRequest.isUserInRole(String)
) into GrantedAuthority
s and stores these in the authentication
details object.
Field Summary | |
---|---|
protected Set<String> |
j2eeMappableRoles
The role attributes returned by the configured MappableAttributesRetriever |
protected Attributes2GrantedAuthoritiesMapper |
j2eeUserRoles2GrantedAuthoritiesMapper
|
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
---|---|
J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource()
|
Method Summary | |
---|---|
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(MappableAttributesRetriever aJ2eeMappableRolesRetriever)
|
void |
setUserRoles2GrantedAuthoritiesMapper(Attributes2GrantedAuthoritiesMapper mapper)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log logger
protected Set<String> j2eeMappableRoles
MappableAttributesRetriever
protected Attributes2GrantedAuthoritiesMapper j2eeUserRoles2GrantedAuthoritiesMapper
Constructor Detail |
---|
public J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource()
Method Detail |
---|
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
protected 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 AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails>
context
- the request object, which may be used by the authentication details object
AuthenticationDetailsSource.buildDetails(Object)
public void setMappableRolesRetriever(MappableAttributesRetriever aJ2eeMappableRolesRetriever)
aJ2eeMappableRolesRetriever
- The MappableAttributesRetriever to usepublic void setUserRoles2GrantedAuthoritiesMapper(Attributes2GrantedAuthoritiesMapper mapper)
mapper
- The Attributes2GrantedAuthoritiesMapper to use
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |