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 anUsernamePrincipalwith an OS/390 username. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares the specified Object with thisUsernamePrincipalfor equality.getName()Return the OS/390 username for thisUsernamePrincipal.inthashCode()Return a hash code for thisUsernamePrincipal.toString()Return a string representation of thisUsernamePrincipal.
-
Constructor Details
-
UsernamePrincipal
Create anUsernamePrincipalwith an OS/390 username.- Parameters:
name- the OS/390 username for this user.- Throws:
NullPointerException- if thenameisnull.RuntimeException- if thenamehas 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 thisUsernamePrincipalfor equality. Returns true if the given object is also aUsernamePrincipaland the two UsernamePrincipals have the same name. -
hashCode
public int hashCode()Return a hash code for thisUsernamePrincipal.
-