|
JAAS | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.security.auth.UserPrincipal
public final class UserPrincipal
A user principal identified by a username or account name.
After successful authentication, a user Principal
can be associated with a particular Subject
to augment that Subject
with an additional identity.
Authorization decisions can then be based upon the
Principal
s that are associated with a Subject
.
This class is immutable.
Constructor Summary | |
---|---|
UserPrincipal(String name)
Creates a principal. |
Method Summary | |
---|---|
boolean |
equals(Object object)
Compares this principal to the specified object. |
String |
getName()
Returns the name of this principal. |
int |
hashCode()
Returns a hash code for this principal. |
String |
toString()
Returns a string representation of this principal. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UserPrincipal(String name)
name
- The principal's string name.
NullPointerException
- If the name
is
null
.Method Detail |
---|
public boolean equals(Object object)
equals
in interface Principal
equals
in class Object
object
- The object to compare this principal against.
public int hashCode()
hashCode
in interface Principal
hashCode
in class Object
public String getName()
getName
in interface Principal
public String toString()
toString
in interface Principal
toString
in class Object
|
JAAS | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |