public final class LdapPrincipal extends Object implements Principal, Serializable
 After successful authentication, a user Principal
 can be associated with a particular Subject
 to augment that Subject with an additional identity.
 Authorization decisions can then be based upon the
 Principals that are associated with a Subject.
 
This class is immutable.
| Constructor and Description | 
|---|
| LdapPrincipal(String name)Creates an LDAP principal. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object object)Compares this principal to the specified object. | 
| String | getName()Returns the name originally used to create this principal. | 
| int | hashCode()Computes the hash code for this principal. | 
| String | toString()Creates a string representation of this principal's name in the format
 defined by RFC 2253. | 
public LdapPrincipal(String name) throws InvalidNameException
name - The principal's string distinguished name.InvalidNameException - If a syntax violation is detected.NullPointerException - If the name is
 null.public boolean equals(Object object)
public int hashCode()
hashCode in interface PrincipalhashCode in class ObjectObject.equals(java.lang.Object), 
System.identityHashCode(java.lang.Object)public String getName()
 Copyright © 1998, 2011, Oracle and/or its affiliates.  All rights reserved.