net.codescore.security
Class CSUserPrincipal
java.lang.Object
net.codescore.security.CSUserPrincipal
- All Implemented Interfaces:
- Serializable, Principal
public class CSUserPrincipal
- extends Object
- implements Principal, Serializable
This class implements the Principal interface
Principals such as this CCTUserPrincipal may be associated
with a particular Subject to augment that Subject
with an additional identity. Refer to the Subject class for
more information on how to achieve this. Authorization decisions can then be
based upon the Principals associated with a Subject.
- See Also:
Principal,
Subject,
Serialized Form
|
Field Summary |
private org.apache.commons.logging.Log |
log
|
private String |
name
|
name
private final String name
log
private org.apache.commons.logging.Log log
CSUserPrincipal
public CSUserPrincipal(String name)
- Parameters:
name -
- Throws:
NullPointerException - if the name is null.
equals
public boolean equals(Object o)
- Specified by:
equals in interface Principal- Overrides:
equals in class Object
getName
public String getName()
- Specified by:
getName in interface Principal
getRoles
public ArrayList<CSRolePrincipal> getRoles(ObjectContext oc)
hashCode
public int hashCode()
- Specified by:
hashCode in interface Principal- Overrides:
hashCode in class Object
toString
public String toString()
- Specified by:
toString in interface Principal- Overrides:
toString in class Object
Copyright 2008 © Adam Cornett, Andrew Conner All Rights Reserved.