public class AuthSPrincipal extends Object implements Principal, Serializable
This class implements the Principal
interface that represents
a user.
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
.
AuthSPrincipal
contains the "set" methods, whereas
AuthPrincipal
contains just the "get" methods.
Principal
,
Subject
,
AuthPrincipal
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected String |
authLevel |
protected String |
authMethod |
protected String |
name |
Constructor and Description |
---|
AuthSPrincipal(String name)
Create an AuthSPrincipal with a username.
|
Modifier and Type | Method and Description |
---|---|
String |
getAuthLevel()
Return the AuthLevel for this
AuthPrincipal . |
String |
getAuthMethod()
Return the AuthMethod for this
AuthPrincipal . |
String |
getName()
Return the username for this
AuthPrincipal . |
protected void |
setAuthLevel(String auth_level)
Set the AuthLevel for this
AuthPrincipal . |
protected void |
setAuthMethod(String auth_method)
Set the AuthMethod for this
AuthPrincipal . |
protected String name
protected String authMethod
protected String authLevel
public AuthSPrincipal(String name)
name
- the username for this user.NullPointerException
- if the name
is null
.public String getName()
AuthPrincipal
.
public String getAuthMethod()
AuthPrincipal
.
AuthPrincipal
public String getAuthLevel()
AuthPrincipal
.
AuthPrincipal
protected void setAuthMethod(String auth_method)
AuthPrincipal
.
auth_method
- AuthMethod for this AuthPrincipal
protected void setAuthLevel(String auth_level)
AuthPrincipal
.
auth_level
- AuthLevel for this AuthPrincipal
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.