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, Authentication

public class OpenIDAuthenticationToken
extends AbstractAuthenticationToken

OpenID Authentication Token

Version:
$Id: OpenIDAuthenticationToken.java 3925 2009-10-05 19:28:53Z ltaylor $
Author:
Robin Bramley
See Also:
Serialized Form

Constructor Summary
OpenIDAuthenticationToken(Object principal, Collection<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, 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<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.

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

getIdentityUrl

public String getIdentityUrl()

getMessage

public String getMessage()

getPrincipal

public 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 List<OpenIDAttribute> getAttributes()

toString

public String toString()
Specified by:
toString in interface Principal
Overrides:
toString in class AbstractAuthenticationToken


Copyright © 2004-2009 SpringSource, Inc. All Rights Reserved.