Class AuthPrincipal
- java.lang.Object
-
- com.sun.identity.authentication.internal.server.AuthSPrincipal
-
- com.sun.identity.authentication.internal.AuthPrincipal
-
- All Implemented Interfaces:
Serializable,Principal
public class AuthPrincipal extends AuthSPrincipal
This class extends the
AuthSPrincipalclass.Principals such as this
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.- See Also:
Principal,Subject, Serialized Form
-
-
Field Summary
-
Fields inherited from class com.sun.identity.authentication.internal.server.AuthSPrincipal
authLevel, authMethod, myAuthI18n, name
-
-
Constructor Summary
Constructors Constructor Description AuthPrincipal(String name)Create anAuthPrincipalwith a user name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Compares the specified object with thisAuthPrincipalfor equality.StringgetAuthLevel()Return the AuthLevel for thisAuthPrincipal.StringgetAuthMethod()Return the AuthMethod for thisAuthPrincipal.StringgetName()Return the user name for thisAuthPrincipal.inthashCode()Return a hash code for thisAuthPrincipal.StringtoString()Return a string representation of thisAuthPrincipal.-
Methods inherited from class com.sun.identity.authentication.internal.server.AuthSPrincipal
setAuthLevel, setAuthMethod
-
-
-
-
Constructor Detail
-
AuthPrincipal
public AuthPrincipal(String name)
Create anAuthPrincipalwith a user name.- Parameters:
name- the name for this user.- Throws:
NullPointerException- if thenameisnull.
-
-
Method Detail
-
getName
public String getName()
Return the user name for thisAuthPrincipal.- Specified by:
getNamein interfacePrincipal- Overrides:
getNamein classAuthSPrincipal- Returns:
- the user name for this
AuthPrincipal
-
getAuthMethod
public String getAuthMethod()
Return the AuthMethod for thisAuthPrincipal.- Overrides:
getAuthMethodin classAuthSPrincipal- Returns:
- the AuthMethod for this
AuthPrincipal
-
getAuthLevel
public String getAuthLevel()
Return the AuthLevel for thisAuthPrincipal.- Overrides:
getAuthLevelin classAuthSPrincipal- Returns:
- the AuthLevel for this
AuthPrincipal
-
toString
public String toString()
Return a string representation of thisAuthPrincipal.
-
equals
public boolean equals(Object o)
Compares the specified object with thisAuthPrincipalfor equality. Returns true if the given object is also anAuthPrincipaland the twoAuthPrincipals have the same user name.
-
-