com.ibm.security.auth
Class JAASPrincipal
- java.lang.Object
com.ibm.security.auth.JAASPrincipal
All implemented interfaces:
java.io.Serializable, java.security.Principal
Direct known subclasses:
DomainIDPrincipal, DomainPrincipal, GroupIDPrincipal, PrimaryGroupIDPrincipal, ServerPrincipal, UserIDPrincipal, UsernamePrincipal, WkstationPrincipal
- public class JAASPrincipal
- extends java.lang.Object
- implements java.security.Principal, java.io.Serializable
This class implements the Principal
interface
and represents general information about a user, group or domain.
Principals such as this JAASPrincipal
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:
Constructor Summary
Constructor and Description |
---|
JAASPrincipal(java.lang.String name)
Create a
JAASPrincipal with an identifying name.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
equals(java.lang.Object o)
Compares the specified Object with this
JAASPrincipal
for equality.
|
|
getName()
Return a string name of this
JAASPrincipal .
|
|
hashCode()
Return a hash code for this
JAASPrincipal .
|
|
toString()
Return a string representation of this
JAASPrincipal .
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail
JAASPrincipal
- public JAASPrincipal(java.lang.String name)
Parameters:
name
- the identifying name.
Throws:
java.lang.NullPointerException
- if the name
is null
. java.lang.IllegalArgumentException
- if the name
has zero length. Method Detail
getName
- public java.lang.String getName( )
Return a string name of this
JAASPrincipal
.
Specified by:
getName
in interface java.security.Principal
Returns:
a string name of this
JAASPrincipal
toString
- public java.lang.String toString( )
Return a string representation of this
JAASPrincipal
.
Specified by:
toString
in interface java.security.Principal
Overrides:
toString
in class java.lang.Object
Returns:
a string representation of this
JAASPrincipal
. equals
- public boolean equals(java.lang.Object o)
Compares the specified Object with this
JAASPrincipal
for equality. Returns true if the given object is also a
JAASPrincipal
and the two JAASPrincipals have the
same String representation.
Specified by:
equals
in interface java.security.Principal
Overrides:
equals
in class java.lang.Object
Parameters:
o
- Object to be compared for equality with this
JAASPrincipal
. Returns:
true if the specified Object is equal to this
JAASPrincipal
. hashCode
- public int hashCode()
Return a hash code for this
JAASPrincipal
.
Specified by:
hashCode
in interface java.security.Principal
Overrides:
hashCode
in class java.lang.Object
Returns:
a hash code for this
JAASPrincipal
.
JAASPrincipal
with an identifying name.