public class AuthPrincipal extends AuthSPrincipal
This class extends the AuthSPrincipal
class.
Principals such as this AuthPrincipal
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 and Description |
---|
AuthPrincipal(String name)
Create an
AuthPrincipal with a user name. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Compares the specified object with this
AuthPrincipal for equality. |
String |
getName()
Return the user name for this
AuthPrincipal . |
int |
hashCode()
Return a hash code for this
AuthPrincipal . |
String |
toString()
Return a string representation of this
AuthPrincipal . |
public AuthPrincipal(String name)
AuthPrincipal
with a user name.name
- the name for this user.NullPointerException
- if the name
is null
.public String getName()
AuthPrincipal
.getName
in class AuthSPrincipal
AuthPrincipal
public boolean equals(Object o)
AuthPrincipal
for equality. Returns true if the given
object is also an AuthPrincipal
and the two
AuthPrincipal
s have the same user name.Copyright © 2010-2016, ForgeRock All Rights Reserved.