spring-security-openid

org.springframework.security.openid
Class OpenIDAuthenticationToken

java.lang.Object
  extended by org.springframework.security.authentication.AbstractAuthenticationToken
      extended by org.springframework.security.openid.OpenIDAuthenticationToken
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

public class OpenIDAuthenticationToken
extends org.springframework.security.authentication.AbstractAuthenticationToken

OpenID Authentication Token

Author:
Robin Bramley
See Also:
Serialized Form

Constructor Summary
OpenIDAuthenticationToken(Object principal, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, String identityUrl, List<OpenIDAttribute> attributes)
          Created by the OpenIDAuthenticationProvider on successful authentication.
OpenIDAuthenticationToken(OpenIDAuthenticationStatus status, String identityUrl, String message, List<OpenIDAttribute> attributes)
           
 
Method Summary
 List<OpenIDAttribute> getAttributes()
           
 Object getCredentials()
          Returns 'null' always, as no credentials are processed by the OpenID provider.
 String getIdentityUrl()
           
 String getMessage()
           
 Object getPrincipal()
          Returns the principal value.
 OpenIDAuthenticationStatus getStatus()
           
 String toString()
           
 
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OpenIDAuthenticationToken

public OpenIDAuthenticationToken(OpenIDAuthenticationStatus status,
                                 String identityUrl,
                                 String message,
                                 List<OpenIDAttribute> attributes)

OpenIDAuthenticationToken

public OpenIDAuthenticationToken(Object principal,
                                 Collection<? extends org.springframework.security.core.GrantedAuthority> authorities,
                                 String identityUrl,
                                 List<OpenIDAttribute> attributes)
Created by the OpenIDAuthenticationProvider on successful authentication.

Parameters:
principal - usually the UserDetails returned by the the configured UserDetailsService used by the OpenIDAuthenticationProvider.
Method Detail

getCredentials

public Object getCredentials()
Returns 'null' always, as no credentials are processed by the OpenID provider.

See Also:
Authentication.getCredentials()

getIdentityUrl

public String getIdentityUrl()

getMessage

public String getMessage()

getPrincipal

public Object getPrincipal()
Returns the principal value.

See Also:
Authentication.getPrincipal()

getStatus

public OpenIDAuthenticationStatus getStatus()

getAttributes

public List<OpenIDAttribute> getAttributes()

toString

public String toString()
Specified by:
toString in interface Principal
Overrides:
toString in class org.springframework.security.authentication.AbstractAuthenticationToken

spring-security-openid