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 int
HASH_CODE_SEED
hash code seed.private LdapEntry
ldapEntry
User ldap entry.private String
ldapName
LDAP 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 int
compareTo(Principal p)
boolean
equals(Object o)
LdapEntry
getLdapEntry()
Returns the ldap entry for this ldap principal.String
getName()
int
hashCode()
String
toString()
-
-
-
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:
compareTo
in interfaceComparable<Principal>
-
-