org.jasig.cas.client.authentication
Class AttributePrincipalImpl

java.lang.Object
  extended by org.jasig.cas.client.authentication.SimplePrincipal
      extended by org.jasig.cas.client.authentication.AttributePrincipalImpl
All Implemented Interfaces:
Serializable, Principal, AttributePrincipal

public class AttributePrincipalImpl
extends SimplePrincipal
implements AttributePrincipal

Concrete implementation of the AttributePrincipal interface.

Since:
3.1
Version:
$Revision$ $Date$
Author:
Scott Battaglia
See Also:
Serialized Form

Constructor Summary
AttributePrincipalImpl(String name)
          Constructs a new principal with an empty map of attributes.
AttributePrincipalImpl(String name, Map<String,Object> attributes)
          Constructs a new principal with the supplied name and attributes.
AttributePrincipalImpl(String name, Map<String,Object> attributes, String proxyGrantingTicket, ProxyRetriever proxyRetriever)
          Constructs a new principal witht he supplied name, attributes, and proxying capabilities.
AttributePrincipalImpl(String name, String proxyGrantingTicket, ProxyRetriever proxyRetriever)
          Constructs a new principal with the supplied name and the proxying capabilities.
 
Method Summary
 Map<String,Object> getAttributes()
          The Map of key/value pairs associated with this principal.
 String getProxyTicketFor(String service)
          Retrieves a CAS proxy ticket for this specific principal.
 
Methods inherited from class org.jasig.cas.client.authentication.SimplePrincipal
equals, getName, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.security.Principal
equals, getName, hashCode, toString
 

Constructor Detail

AttributePrincipalImpl

public AttributePrincipalImpl(String name)
Constructs a new principal with an empty map of attributes.

Parameters:
name - the unique identifier for the principal.

AttributePrincipalImpl

public AttributePrincipalImpl(String name,
                              Map<String,Object> attributes)
Constructs a new principal with the supplied name and attributes.

Parameters:
name - the unique identifier for the principal.
attributes - the key/value pairs for this principal.

AttributePrincipalImpl

public AttributePrincipalImpl(String name,
                              String proxyGrantingTicket,
                              ProxyRetriever proxyRetriever)
Constructs a new principal with the supplied name and the proxying capabilities.

Parameters:
name - the unique identifier for the principal.
proxyGrantingTicket - the ticket associated with this principal.
proxyRetriever - the ProxyRetriever implementation to call back to the CAS server.

AttributePrincipalImpl

public AttributePrincipalImpl(String name,
                              Map<String,Object> attributes,
                              String proxyGrantingTicket,
                              ProxyRetriever proxyRetriever)
Constructs a new principal witht he supplied name, attributes, and proxying capabilities.

Parameters:
name - the unique identifier for the principal.
attributes - the key/value pairs for this principal.
proxyGrantingTicket - the ticket associated with this principal.
proxyRetriever - the ProxyRetriever implementation to call back to the CAS server.
Method Detail

getAttributes

public Map<String,Object> getAttributes()
Description copied from interface: AttributePrincipal
The Map of key/value pairs associated with this principal.

Specified by:
getAttributes in interface AttributePrincipal
Returns:
the map of key/value pairs associated with this principal.

getProxyTicketFor

public String getProxyTicketFor(String service)
Description copied from interface: AttributePrincipal
Retrieves a CAS proxy ticket for this specific principal.

Specified by:
getProxyTicketFor in interface AttributePrincipal
Parameters:
service - the service we wish to proxy this user to.
Returns:
a String representing the proxy ticket.


Copyright © 2006-2011 Jasig. All Rights Reserved.