After successful authentication, a user java.
can be associated with a particular javax.
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.
| Modifier and Type | Field and Description |
|---|---|
| private final LdapName | name
The principal's name |
| private final String | nameString
The principal's string name |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if they are equal; false otherwise.The object to compare this principal against. object)Overrides java. Implements java. Compares this principal to the specified object. |
| private LdapName | |
| public String | Returns: The principal's string name.Implements java. Returns the name originally used to create this principal. |
| public int | Returns: The principal's hash code.Overrides java. Implements java. Computes the hash code for this principal. |
| private void | readObject(ObjectInputStream
the stream)ObjectInputStream from which data is readRestores the state of this object from the stream. |
| public String | Returns: The principal's string name.Overrides java. Implements java. Creates a string representation of this principal's name in the format defined by RFC 2253. |
| name | back to summary |
|---|---|
| private final LdapName name The principal's name | |
| nameString | back to summary |
|---|---|
| private final String nameString The principal's string name | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID
| |
| LdapPrincipal | back to summary |
|---|---|
| public LdapPrincipal(String name) throws InvalidNameException Creates an LDAP principal.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides java. Implements java. Compares this principal to the specified object.
| |
| getLdapName | back to summary |
|---|---|
| private LdapName getLdapName(String name) throws InvalidNameException | |
| getName | back to summary |
|---|---|
| public String getName() Implements java. Returns the name originally used to create this principal.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements java. Computes the hash code for this principal.
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException Restores the state of this object from the stream.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements java. Creates a string representation of this principal's name in the format defined by RFC 2253. If the name has zero components an empty string is returned.
| |