Package org.ldaptive.jaas
Class LdapDnPrincipal
- java.lang.Object
-
- org.ldaptive.jaas.LdapDnPrincipal
-
- All Implemented Interfaces:
Comparable<Principal>
,Principal
public class LdapDnPrincipal 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 String
ldapDn
LDAP user name.private LdapEntry
ldapEntry
User ldap entry.
-
Constructor Summary
Constructors Constructor Description LdapDnPrincipal(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
-
ldapDn
private final String ldapDn
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>
-
-