Class MembershipPrincipal
- java.lang.Object
-
- com.sun.identity.authentication.modules.membership.MembershipPrincipal
-
- All Implemented Interfaces:
Serializable,Principal
public class MembershipPrincipal extends Object implements Principal, Serializable
This class implements thePrincipalinterface and represents an Membership user.Principals such as this
MembershipPrincipalmay 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MembershipPrincipal(String name)Creates aMembershipPrincipalwith a Membership user name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Compares the specified Object with thisMembershipPrincipalfor equality.StringgetName()Returns the Membership user name for thisMembershipPrincipal.inthashCode()Returns a hash code for thisMembershipPrincipal.StringtoString()Returns a string representation of thisMembershipPrincipal.
-
-
-
Constructor Detail
-
MembershipPrincipal
public MembershipPrincipal(String name)
Creates aMembershipPrincipalwith a Membership user name.- Parameters:
name- the Membership user name for this user.- Throws:
NullPointerException- if thenameisnull.
-
-
Method Detail
-
getName
public String getName()
Returns the Membership user name for thisMembershipPrincipal.
-
toString
public String toString()
Returns a string representation of thisMembershipPrincipal.
-
equals
public boolean equals(Object o)
Compares the specified Object with thisMembershipPrincipalfor equality. Returns true if the given object is also aMembershipPrincipaland the twoMembershipPrincipalshave the same user name.
-
-