Class AuthSPrincipal
- java.lang.Object
-
- com.sun.identity.authentication.internal.server.AuthSPrincipal
-
- All Implemented Interfaces:
Serializable,Principal
- Direct Known Subclasses:
AuthPrincipal
public class AuthSPrincipal extends Object implements Principal, Serializable
This class implements the
Principalinterface that represents a user.AuthPrincipalmay be associated with a particularSubjectto augment thatSubjectwith an additional identity. Refer to theSubjectclass for more information on how to achieve this. Authorization decisions can then be based upon the Principals associated with aSubject.AuthSPrincipalcontains the "set" methods, whereasAuthPrincipalcontains just the "get" methods.- See Also:
Principal,Subject,AuthPrincipal, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected StringauthLevelprotected StringauthMethodprotected I18nmyAuthI18nprotected Stringname
-
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 StringgetAuthLevel()Return the AuthLevel for thisAuthPrincipal.StringgetAuthMethod()Return the AuthMethod for thisAuthPrincipal.StringgetName()Return the username for thisAuthPrincipal.protected voidsetAuthLevel(String auth_level)Set the AuthLevel for thisAuthPrincipal.protected voidsetAuthMethod(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 thenameisnull.
-
-
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
-
-