org.jasig.cas.client.authentication
Class AttributePrincipalImpl

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

public class AttributePrincipalImpl
extends java.lang.Object
implements AttributePrincipal

Concrete implementation of the AttributePrincipal interface.

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

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

Constructor Detail

AttributePrincipalImpl

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

Parameters:
name - the unique identifier for the principal.

AttributePrincipalImpl

public AttributePrincipalImpl(java.lang.String name,
                              java.util.Map 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(java.lang.String name,
                              java.lang.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(java.lang.String name,
                              java.util.Map attributes,
                              java.lang.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 java.util.Map 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 java.lang.String getProxyTicketFor(java.lang.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.

getName

public java.lang.String getName()
Specified by:
getName in interface java.security.Principal


Copyright © 2006-2009 JA-SIG. All Rights Reserved.