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:
java.io.Serializable, java.security.Principal, Authentication, CredentialsContainer

public class OpenIDAuthenticationToken
extends AbstractAuthenticationToken

OpenID Authentication Token

See Also:
Serialized Form

Constructor Summary
OpenIDAuthenticationToken(java.lang.Object principal, java.util.Collection<? extends GrantedAuthority> authorities, java.lang.String identityUrl, java.util.List<OpenIDAttribute> attributes)
          Created by the OpenIDAuthenticationProvider on successful authentication.
OpenIDAuthenticationToken(OpenIDAuthenticationStatus status, java.lang.String identityUrl, java.lang.String message, java.util.List<OpenIDAttribute> attributes)
           
 
Method Summary
 java.util.List<OpenIDAttribute> getAttributes()
           
 java.lang.Object getCredentials()
          Returns 'null' always, as no credentials are processed by the OpenID provider.
 java.lang.String getIdentityUrl()
           
 java.lang.String getMessage()
           
 java.lang.Object getPrincipal()
          Returns the principal value.
 OpenIDAuthenticationStatus getStatus()
           
 java.lang.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,
                                 java.lang.String identityUrl,
                                 java.lang.String message,
                                 java.util.List<OpenIDAttribute> attributes)

OpenIDAuthenticationToken

public OpenIDAuthenticationToken(java.lang.Object principal,
                                 java.util.Collection<? extends GrantedAuthority> authorities,
                                 java.lang.String identityUrl,
                                 java.util.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 java.lang.Object getCredentials()
Returns 'null' always, as no credentials are processed by the OpenID provider.

Returns:
the credentials that prove the identity of the Principal
See Also:
Authentication.getCredentials()

getIdentityUrl

public java.lang.String getIdentityUrl()

getMessage

public java.lang.String getMessage()

getPrincipal

public java.lang.Object getPrincipal()
Returns the principal value.

Returns:
the Principal being authenticated or the authenticated principal after authentication.
See Also:
Authentication.getPrincipal()

getStatus

public OpenIDAuthenticationStatus getStatus()

getAttributes

public java.util.List<OpenIDAttribute> getAttributes()

toString

public java.lang.String toString()
Specified by:
toString in interface java.security.Principal
Overrides:
toString in class AbstractAuthenticationToken