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 FormauthLevel, authMethod, myAuthI18n, name
Constructor 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 |
getAuthLevel()
Return the AuthLevel for this
AuthPrincipal . |
String |
getAuthMethod()
Return the AuthMethod for this
AuthPrincipal . |
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 . |
setAuthLevel, setAuthMethod
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 interface Principal
getName
in class AuthSPrincipal
AuthPrincipal
public String getAuthMethod()
AuthPrincipal
.getAuthMethod
in class AuthSPrincipal
AuthPrincipal
public String getAuthLevel()
AuthPrincipal
.getAuthLevel
in class AuthSPrincipal
AuthPrincipal
public String toString()
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–2025 Open Identity Platform Community. All rights reserved.