Package com.sun.identity.rest
Class AuthSPrincipal
- java.lang.Object
-
- com.sun.identity.rest.AuthSPrincipal
-
- All Implemented Interfaces:
Serializable
,Principal
public class AuthSPrincipal extends Object implements Principal, Serializable
This class implements the
Principal
interface that represents a user.AuthPrincipal
may be associated with a particularSubject
to augment thatSubject
with an additional identity. Refer to theSubject
class for more information on how to achieve this. Authorization decisions can then be based upon the Principals associated with aSubject
.AuthSPrincipal
contains the "set" methods, whereasAuthPrincipal
contains just the "get" methods.- See Also:
Principal
,Subject
,AuthPrincipal
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AuthSPrincipal(String name)
Create an AuthSPrincipal with a username.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAuthLevel()
Return the AuthLevel for thisAuthPrincipal
.String
getAuthMethod()
Return the AuthMethod for thisAuthPrincipal
.String
getName()
Return the username for thisAuthPrincipal
.protected void
setAuthLevel(String auth_level)
Set the AuthLevel for thisAuthPrincipal
.protected void
setAuthMethod(String auth_method)
Set the AuthMethod for thisAuthPrincipal
.
-
-
-
Constructor Detail
-
AuthSPrincipal
public AuthSPrincipal(String name)
Create an AuthSPrincipal with a username.- Parameters:
name
- the username for this user.- Throws:
NullPointerException
- if thename
isnull
.
-
-
Method Detail
-
getName
public String getName()
Return the username for thisAuthPrincipal
.
-
getAuthMethod
public String getAuthMethod()
Return the AuthMethod for thisAuthPrincipal
.- Returns:
- the AuthMethod for this
AuthPrincipal
-
getAuthLevel
public String getAuthLevel()
Return the AuthLevel for thisAuthPrincipal
.- Returns:
- the AuthLevel for this
AuthPrincipal
-
setAuthMethod
protected void setAuthMethod(String auth_method)
Set the AuthMethod for thisAuthPrincipal
.- Parameters:
auth_method
- AuthMethod for thisAuthPrincipal
-
setAuthLevel
protected void setAuthLevel(String auth_level)
Set the AuthLevel for thisAuthPrincipal
.- Parameters:
auth_level
- AuthLevel for thisAuthPrincipal
-
-