APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.security.auth

public Class NTSidDomainPrincipal

extends NTSid
Class Inheritance

This class extends NTSid and represents a Windows NT user's domain SID.

An NT user only has a domain SID if in fact they are logged into an NT domain. If the user is logged into a workgroup or just a standalone configuration, they will NOT have a domain SID.

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

Since
1.4
See Also
java.security.Principal, javax.security.auth.Subject

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
NTSidDomainPrincipal(String
a string version of the Windows NT SID for this user's domain.
name
)

Create an NTSidDomainPrincipal with a Windows NT SID.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the specified Object is equal to this NTSidDomainPrincipal.
equals
(Object
Object to be compared for equality with this NTSidDomainPrincipal.
o
)

Overrides com.sun.security.auth.NTSid.equals.

Implements java.security.Principal.equals.

Compares the specified Object with this NTSidDomainPrincipal for equality.

public String

Returns:

a string representation of this NTSidDomainPrincipal.
toString
()

Overrides com.sun.security.auth.NTSid.toString.

Implements java.security.Principal.toString.

Return a string representation of this NTSidDomainPrincipal.

Inherited from com.sun.security.auth.NTSid:
getNamehashCode

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.sun.security.auth.NTSid.serialVersionUID.

Constructor Detail

NTSidDomainPrincipalback to summary
public NTSidDomainPrincipal(String name)

Create an NTSidDomainPrincipal with a Windows NT SID.

Parameters
name:String

a string version of the Windows NT SID for this user's domain.

Exceptions
NullPointerException:
if the name is null.

Method Detail

equalsback to summary
public boolean equals(Object o)

Overrides com.sun.security.auth.NTSid.equals.

Implements java.security.Principal.equals.

Compares the specified Object with this NTSidDomainPrincipal for equality. Returns true if the given object is also a NTSidDomainPrincipal and the two NTSidDomainPrincipals have the same SID.

Parameters
o:Object

Object to be compared for equality with this NTSidDomainPrincipal.

Returns:boolean

true if the specified Object is equal to this NTSidDomainPrincipal.

toStringback to summary
public String toString()

Overrides com.sun.security.auth.NTSid.toString.

Implements java.security.Principal.toString.

Return a string representation of this NTSidDomainPrincipal.

Returns:String

a string representation of this NTSidDomainPrincipal.