java.lang.Object
com.ibm.security.auth.UsernamePrincipal
- All Implemented Interfaces:
Serializable
,Principal
This class implements the Principal
interface
and represents an OS/390 user.
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 on
the Principals associated with a Subject
.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUsernamePrincipal
(String name) Create anUsernamePrincipal
with an OS/390 username. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the specified Object with thisUsernamePrincipal
for equality.getName()
Return the OS/390 username for thisUsernamePrincipal
.int
hashCode()
Return a hash code for thisUsernamePrincipal
.toString()
Return a string representation of thisUsernamePrincipal
.
-
Constructor Details
-
UsernamePrincipal
Create anUsernamePrincipal
with an OS/390 username.- Parameters:
name
- the OS/390 username for this user.- Throws:
NullPointerException
- if thename
isnull
.RuntimeException
- if thename
has zero length.
-
-
Method Details
-
getName
Return the OS/390 username for thisUsernamePrincipal
. -
toString
Return a string representation of thisUsernamePrincipal
. -
equals
Compares the specified Object with thisUsernamePrincipal
for equality. Returns true if the given object is also aUsernamePrincipal
and the two UsernamePrincipals have the same name. -
hashCode
public int hashCode()Return a hash code for thisUsernamePrincipal
.
-