Package org.ldaptive.jaas
Class LdapPrincipal
- java.lang.Object
-
- org.ldaptive.jaas.LdapPrincipal
-
- All Implemented Interfaces:
Comparable<Principal>,Principal
public class LdapPrincipal extends Object implements Principal, Comparable<Principal>
Provides a custom implementation for adding LDAP principals to a subject.
-
-
Field Summary
Fields Modifier and Type Field Description private static intHASH_CODE_SEEDhash code seed.private LdapEntryldapEntryUser ldap entry.private StringldapNameLDAP user name.
-
Constructor Summary
Constructors Constructor Description LdapPrincipal(String name, LdapEntry entry)Creates a new ldap principal with the supplied name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Principal p)booleanequals(Object o)LdapEntrygetLdapEntry()Returns the ldap entry for this ldap principal.StringgetName()inthashCode()StringtoString()
-
-
-
Field Detail
-
HASH_CODE_SEED
private static final int HASH_CODE_SEED
hash code seed.- See Also:
- Constant Field Values
-
ldapName
private final String ldapName
LDAP user name.
-
ldapEntry
private final LdapEntry ldapEntry
User ldap entry.
-
-
Method Detail
-
getLdapEntry
public LdapEntry getLdapEntry()
Returns the ldap entry for this ldap principal.- Returns:
- ldap entry
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
toString
public String toString()
-
compareTo
public int compareTo(Principal p)
- Specified by:
compareToin interfaceComparable<Principal>
-
-