com.ibm.security.auth
Class X500Principal

java.lang.Object
  |
  +--com.ibm.security.auth.X500Principal
All Implemented Interfaces:
java.security.Principal, java.io.Serializable

public class X500Principal
extends java.lang.Object
implements java.security.Principal, java.io.Serializable

This class represents an X.500 Principal. X500Principals have names such as, "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US" (RFC 1779 style).

Principals such as this X500Principal may be associated with a particular Subject to augment that Subject with an additional identity. Refer to the Subject class for more information on how to achieve this. Authorization decisions can then be based upon the Principals associated with a Subject.

Version:
1.3, 01/14/00
See Also:
Principal, Subject, Serialized Form

Constructor Summary
java.lang.String)">X500Principal(java.lang.String name)
          Create a X500Principal with an X.500 Name, such as "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US" (RFC 1779 style).
 
Method Summary
 boolean java.lang.Object)">equals(java.lang.Object o)
          Compares the specified Object with this X500Principal for equality.
 java.lang.String getName()
          Return the Unix username for this X500Principal.
 int hashCode()
          Return a hash code for this X500Principal.
 java.lang.String toString()
          Return a string representation of this X500Principal.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail
java.lang.String)">

X500Principal

public X500Principal(java.lang.String name)
Create a X500Principal with an X.500 Name, such as "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US" (RFC 1779 style).

Parameters:
name - the X.500 name
Throws:
NullPointerException - if the name is null.

java.lang.IllegalArgumentException - if the name is improperly specified.
Method Detail

getName

public java.lang.String getName()
Return the Unix username for this X500Principal.

Specified by:
getName in interface java.security.Principal
Returns:
the Unix username for this X500Principal

toString

public java.lang.String toString()
Return a string representation of this X500Principal.

Specified by:
toString in interface java.security.Principal
Overrides:
toString in class java.lang.Object
Returns:
a string representation of this X500Principal.

java.lang.Object)">

equals

public boolean equals(java.lang.Object o)
Compares the specified Object with this X500Principal for equality.

Specified by:
equals in interface java.security.Principal
Overrides:
equals in class java.lang.Object
Parameters:
o - Object to be compared for equality with this X500Principal.
Returns:
true if the specified Object is equal equal to this X500Principal.

hashCode

public int hashCode()
Return a hash code for this X500Principal.

Specified by:
hashCode in interface java.security.Principal
Overrides:
hashCode in class java.lang.Object
Returns:
a hash code for this X500Principal.