de.theit.hudson.crowd
Class CrowdAuthenticationToken

java.lang.Object
  extended by org.acegisecurity.providers.AbstractAuthenticationToken
      extended by de.theit.hudson.crowd.CrowdAuthenticationToken
All Implemented Interfaces:
Serializable, Principal, org.acegisecurity.Authentication

public class CrowdAuthenticationToken
extends org.acegisecurity.providers.AbstractAuthenticationToken

This class represents an authentication token that is created after a user was successfully authenticated against the remote Crowd server.

Since:
07.09.2011
Version:
$Id$
Author:
Thorsten Heit (theit@gmx.de)
See Also:
Serialized Form

Constructor Summary
CrowdAuthenticationToken(String pPrincipal, String pCredentials, List<org.acegisecurity.GrantedAuthority> authorities)
          Creates a new authorization token.
CrowdAuthenticationToken(String pPrincipal, String pCredentials, List<org.acegisecurity.GrantedAuthority> authorities, String pSsoToken, String pDisplayName)
          Creates a new authorization token.
 
Method Summary
 String getCredentials()
          
 String getName()
          
 String getPrincipal()
          
 String getSSOToken()
          Returns the SSO token.
 
Methods inherited from class org.acegisecurity.providers.AbstractAuthenticationToken
equals, getAuthorities, getDetails, hashCode, isAuthenticated, setAuthenticated, setDetails, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CrowdAuthenticationToken

public CrowdAuthenticationToken(String pPrincipal,
                                String pCredentials,
                                List<org.acegisecurity.GrantedAuthority> authorities)
Creates a new authorization token.

Parameters:
pPrincipal - The name of the authenticated Crowd user. May not be null.
pCredentials - The credentials. Normally the users password. May not be null.
authorities - The list of granted authorities for the user. May not be null.

CrowdAuthenticationToken

public CrowdAuthenticationToken(String pPrincipal,
                                String pCredentials,
                                List<org.acegisecurity.GrantedAuthority> authorities,
                                String pSsoToken,
                                String pDisplayName)
Creates a new authorization token.

Parameters:
pPrincipal - The name of the authenticated Crowd user. May not be null.
pCredentials - The credentials. Normally the users password. May only be null when the SSO token is given.
authorities - The list of granted authorities for the user. May not be null.
pSsoToken - The Crowd SSO token. May be null if the token is not (yet) available.
pDisplayName - The display name of the user. May be null.
Method Detail

getCredentials

public String getCredentials()

See Also:
Authentication.getCredentials()

getPrincipal

public String getPrincipal()

See Also:
Authentication.getPrincipal()

getSSOToken

public String getSSOToken()
Returns the SSO token.

Returns:
The SSO token. null if the token is not (yet) available.

getName

public String getName()

Specified by:
getName in interface Principal
Overrides:
getName in class org.acegisecurity.providers.AbstractAuthenticationToken
See Also:
AbstractAuthenticationToken.getName()


Copyright © 2004-2011 Hudson. All Rights Reserved.