org.springframework.security.web.authentication.preauth.websphere
Class WebSpherePreAuthenticatedAuthenticationDetailsSource

java.lang.Object
  extended by org.springframework.security.authentication.AuthenticationDetailsSourceImpl
      extended by org.springframework.security.web.authentication.preauth.websphere.WebSpherePreAuthenticatedAuthenticationDetailsSource
All Implemented Interfaces:
InitializingBean, AuthenticationDetailsSource
Direct Known Subclasses:
WebSpherePreAuthenticatedWebAuthenticationDetailsSource

public class WebSpherePreAuthenticatedAuthenticationDetailsSource
extends AuthenticationDetailsSourceImpl
implements InitializingBean

This AuthenticationDetailsSource implementation, when configured with a MutableGrantedAuthoritiesContainer, will set the pre-authenticated granted authorities based on the WebSphere groups for the current WebSphere user, mapped using the configured Attributes2GrantedAuthoritiesMapper. By default, this class is configured to build instances of the PreAuthenticatedGrantedAuthoritiesAuthenticationDetails class.


Constructor Summary
WebSpherePreAuthenticatedAuthenticationDetailsSource()
          Public constructor which overrides the default AuthenticationDetails class to be used.
 
Method Summary
 void afterPropertiesSet()
          Check that all required properties have been set.
 Object buildDetails(Object context)
          Build the authentication details object.
 void setWebSphereGroups2GrantedAuthoritiesMapper(Attributes2GrantedAuthoritiesMapper mapper)
           
 
Methods inherited from class org.springframework.security.authentication.AuthenticationDetailsSourceImpl
setClazz
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebSpherePreAuthenticatedAuthenticationDetailsSource

public WebSpherePreAuthenticatedAuthenticationDetailsSource()
Public constructor which overrides the default AuthenticationDetails class to be used.

Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Check that all required properties have been set.

Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

buildDetails

public Object buildDetails(Object context)
Build the authentication details object. If the specified authentication details class implements the PreAuthenticatedGrantedAuthoritiesSetter, a list of pre-authenticated Granted Authorities will be set based on the WebSphere groups for the current user.

Specified by:
buildDetails in interface AuthenticationDetailsSource
Overrides:
buildDetails in class AuthenticationDetailsSourceImpl
Parameters:
context - the request object, which may be used by the authentication details object
Returns:
a fully-configured authentication details instance
See Also:
AuthenticationDetailsSource.buildDetails(Object)

setWebSphereGroups2GrantedAuthoritiesMapper

public void setWebSphereGroups2GrantedAuthoritiesMapper(Attributes2GrantedAuthoritiesMapper mapper)
Parameters:
mapper - The Attributes2GrantedAuthoritiesMapper to use