org.keel.services.authentication
Class GroupPrincipal
java.lang.Object
org.keel.services.authentication.GroupPrincipal
- All Implemented Interfaces:
- java.security.Principal, java.io.Serializable
- public class GroupPrincipal
- extends java.lang.Object
- implements java.security.Principal, java.io.Serializable
Basic implementation of the Principal class. By implementing our own Principal for our application, we can more easily add and remove instances of our principals in the authenticated Subject during the login and logout process.
- Version:
- 1.0
- Author:
- Paul Feuer and John Musser
- See Also:
Principal, Serialized Form
| Field Summary |
private java.lang.String |
name
|
| Constructor Summary |
GroupPrincipal()
Create a GroupPrincipal with no user name. |
GroupPrincipal(java.lang.String newName)
Create a GroupPrincipal using a String representation of the user name. |
| Method Summary |
boolean |
equals(java.lang.Object o)
Compares the specified Object with this GroupPrincipal for equality. |
java.lang.String |
getName()
Return the user name for this GroupPrincipal. |
int |
hashCode()
Return a hash code for this GroupPrincipal. |
java.lang.String |
toString()
Return a string representation of this GroupPrincipal. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
name
private java.lang.String name
-
GroupPrincipal
public GroupPrincipal()
-
Create a
GroupPrincipal with no user name.
GroupPrincipal
public GroupPrincipal(java.lang.String newName)
-
Create a
GroupPrincipal using a String representation of the user name.
equals
public boolean equals(java.lang.Object o)
-
Compares the specified Object with this
GroupPrincipal for equality. Returns true if the given object is also a GroupPrincipal and the two GroupPrincipals have the same name.
-
- Specified by:
equals in interface java.security.Principal
-
- Parameters:
o - Object to be compared for equality with this GroupPrincipal.
- Returns:
- true if the specified Object is equal equal to this
GroupPrincipal.
hashCode
public int hashCode()
-
Return a hash code for this
GroupPrincipal.
-
- Specified by:
hashCode in interface java.security.Principal
-
- Returns:
- a hash code for this
GroupPrincipal.
toString
public java.lang.String toString()
-
Return a string representation of this
GroupPrincipal.
-
- Specified by:
toString in interface java.security.Principal
-
- Returns:
- a string representation of this
GroupPrincipal.
getName
public java.lang.String getName()
-
Return the user name for this
GroupPrincipal.
-
- Specified by:
getName in interface java.security.Principal
-
- Returns:
- the user name for this
GroupPrincipal
Please see keelframework.org for information about new Keel releases.