public abstract class AbstractPreAuthenticatedAuthenticationDetailsSource extends AuthenticationDetailsSourceImpl
buildDetails(Object)
.
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
j2eeMappableRoles |
protected Attributes2GrantedAuthoritiesMapper |
j2eeUserRoles2GrantedAuthoritiesMapper |
protected org.apache.commons.logging.Log |
logger |
Constructor and Description |
---|
AbstractPreAuthenticatedAuthenticationDetailsSource() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Check that all required properties have been set.
|
java.lang.Object |
buildDetails(java.lang.Object context)
Build the authentication details object.
|
protected abstract java.lang.String[] |
getUserRoles(java.lang.Object context,
java.lang.String[] mappableRoles)
Allows the roles of the current user to be determined from the context object
|
void |
setMappableRolesRetriever(MappableAttributesRetriever aJ2eeMappableRolesRetriever) |
void |
setUserRoles2GrantedAuthoritiesMapper(Attributes2GrantedAuthoritiesMapper mapper) |
setClazz
protected final org.apache.commons.logging.Log logger
protected java.lang.String[] j2eeMappableRoles
protected Attributes2GrantedAuthoritiesMapper j2eeUserRoles2GrantedAuthoritiesMapper
public AbstractPreAuthenticatedAuthenticationDetailsSource()
public void afterPropertiesSet() throws java.lang.Exception
java.lang.Exception
public java.lang.Object buildDetails(java.lang.Object context)
MutableGrantedAuthoritiesContainer
, a
list of pre-authenticated Granted Authorities will be set based on the
roles for the current user.buildDetails
in interface AuthenticationDetailsSource
buildDetails
in class AuthenticationDetailsSourceImpl
context
- the request object, which may be used by the authentication details objectAuthenticationDetailsSource.buildDetails(Object)
protected abstract java.lang.String[] getUserRoles(java.lang.Object context, java.lang.String[] mappableRoles)
context
- the context object (an HttpRequest, PortletRequest etc)mappableRoles
- the possible roles as determined by the MappableAttributesRetrieverpublic void setMappableRolesRetriever(MappableAttributesRetriever aJ2eeMappableRolesRetriever)
aJ2eeMappableRolesRetriever
- The MappableAttributesRetriever to usepublic void setUserRoles2GrantedAuthoritiesMapper(Attributes2GrantedAuthoritiesMapper mapper)
mapper
- The Attributes2GrantedAuthoritiesMapper to use