|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.security.auth.JAASPrincipal
com.ibm.security.auth.UsernamePrincipal
public class UsernamePrincipal
This class extends the JAASPrincipal
class and
represents the username provided when logging onto a system or server.
Principals such as this UsernamePrincipal
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
.
Principal
,
Subject
,
Serialized FormConstructor Summary | |
---|---|
UsernamePrincipal(java.lang.String name)
Create an UsernamePrincipal with a provided username. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Compares the specified Object with this UsernamePrincipal
for equality. |
java.lang.String |
toString()
Return a string representation of this UsernamePrincipal . |
Methods inherited from class com.ibm.security.auth.JAASPrincipal |
---|
getName, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UsernamePrincipal(java.lang.String name)
UsernamePrincipal
with a provided username.
name
- the provided username for this user.
java.lang.NullPointerException
- if the name
is null
.
java.lang.IllegalArgumentException
- if the name
has zero length.Method Detail |
---|
public java.lang.String toString()
UsernamePrincipal
.
toString
in interface java.security.Principal
toString
in class JAASPrincipal
UsernamePrincipal
.public boolean equals(java.lang.Object o)
UsernamePrincipal
for equality. Returns true if the given object is also a
UsernamePrincipal
and the two UsernamePrincipals
have the same name.
equals
in interface java.security.Principal
equals
in class JAASPrincipal
o
- Object to be compared for equality with this
UsernamePrincipal
.
UsernamePrincipal
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |