org.acegisecurity.providers.cas
Class CasAuthenticationToken

java.lang.Object
  extended by org.acegisecurity.providers.AbstractAuthenticationToken
      extended by org.acegisecurity.providers.cas.CasAuthenticationToken
All Implemented Interfaces:
Serializable, Principal, Authentication

public class CasAuthenticationToken
extends AbstractAuthenticationToken
implements Serializable

Represents a successful CAS Authentication.

Version:
$Id: CasAuthenticationToken.java 1784 2007-02-24 21:00:24Z luke_t $
Author:
Ben Alex
See Also:
Serialized Form

Constructor Summary
CasAuthenticationToken(String key, Object principal, Object credentials, GrantedAuthority[] authorities, UserDetails userDetails, List proxyList, String proxyGrantingTicketIou)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
           
 Object getCredentials()
          The credentials that prove the principal is correct.
 int getKeyHash()
           
 Object getPrincipal()
          The identity of the principal being authenticated.
 String getProxyGrantingTicketIou()
          Obtains the proxy granting ticket IOU.
 List getProxyList()
           
 UserDetails getUserDetails()
           
 String toString()
           
 
Methods inherited from class org.acegisecurity.providers.AbstractAuthenticationToken
getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CasAuthenticationToken

public CasAuthenticationToken(String key,
                              Object principal,
                              Object credentials,
                              GrantedAuthority[] authorities,
                              UserDetails userDetails,
                              List proxyList,
                              String proxyGrantingTicketIou)
Constructor.

Parameters:
key - to identify if this object made by a given CasAuthenticationProvider
principal - typically the UserDetails object (cannot be null)
credentials - the service/proxy ticket ID from CAS (cannot be null)
authorities - the authorities granted to the user (from CasAuthoritiesPopulator) (cannot be null)
userDetails - the user details (from CasAuthoritiesPopulator) (cannot be null)
proxyList - the list of proxies from CAS (cannot be null)
proxyGrantingTicketIou - the PGT-IOU ID from CAS (cannot be null, but may be an empty String if no PGT-IOU ID was provided)
Throws:
IllegalArgumentException - if a null was passed
Method Detail

equals

public boolean equals(Object obj)
Specified by:
equals in interface Principal
Overrides:
equals in class AbstractAuthenticationToken

getCredentials

public Object getCredentials()
Description copied from interface: Authentication
The credentials that prove the principal is correct. This is usually a password, but could be anything relevant to the AuthenticationManager. Callers are expected to populate the credentials.

Specified by:
getCredentials in interface Authentication
Returns:
the credentials that prove the identity of the Principal

getKeyHash

public int getKeyHash()

getPrincipal

public Object getPrincipal()
Description copied from interface: Authentication
The identity of the principal being authenticated. This is usually a username. Callers are expected to populate the principal.

Specified by:
getPrincipal in interface Authentication
Returns:
the Principal being authenticated

getProxyGrantingTicketIou

public String getProxyGrantingTicketIou()
Obtains the proxy granting ticket IOU.

Returns:
the PGT IOU-ID or an empty String if no proxy callback was requested when validating the service ticket

getProxyList

public List getProxyList()

getUserDetails

public UserDetails getUserDetails()

toString

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


Copyright © 2004-2011 Interface21, Inc. All Rights Reserved.