com.ibm.security.auth

Class NTDomainPrincipal

  1. java.lang.Object
  2. extended bycom.ibm.security.auth.NTDomainPrincipal
All implemented interfaces:
java.io.Serializable, java.security.Principal

  1. public class NTDomainPrincipal
  2. extends java.lang.Object
  3. implements java.security.Principal, java.io.Serializable

This class implements the Principal interface and represents the name of the Windows NT domain into which the user authenticated. This will be a domain name if the user logged into a Windows NT domain, a workgroup name if the user logged into a workgroup, or a machine name if the user logged into a standalone configuration.

Principals such as this NTDomainPrincipal 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.

This class will be replaced by DomainPrincipal in future releases of JAAS.

See Also:
Principal, Subject, DomainPrincipal, Serialized Form

Constructor Summary

Constructor and Description
NTDomainPrincipal(java.lang.String name)
Create an NTDomainPrincipal with a Windows NT domain name.

Method Summary

Modifier and Type Method and Description
  1. boolean
equals(java.lang.Object o)
Compares the specified Object with this NTDomainPrincipal for equality.
  1. java.lang.String
getName()
Return the Windows NT domain name for this NTDomainPrincipal.
  1. int
hashCode()
Return a hash code for this NTDomainPrincipal.
  1. java.lang.String
toString()
Return a string representation of this NTDomainPrincipal.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

NTDomainPrincipal

  1. public NTDomainPrincipal(java.lang.String name)
Create an NTDomainPrincipal with a Windows NT domain name.

Parameters:
name - the Windows NT domain name for this user.

Throws:
java.lang.NullPointerException - if the name is null.

Method Detail

getName

  1. public java.lang.String getName( )
Return the Windows NT domain name for this NTDomainPrincipal.

Specified by:
getName in interface java.security.Principal
Returns:
the Windows NT domain name for this NTDomainPrincipal

toString

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

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

equals

  1. public boolean equals(java.lang.Object o)
Compares the specified Object with this NTDomainPrincipal for equality. Returns true if the given object is also a NTDomainPrincipal and the two NTDomainPrincipals have the same name.

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 NTDomainPrincipal.
Returns:
true if the specified Object is equal equal to this NTDomainPrincipal.

hashCode

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

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