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

public Class NTSidUserPrincipal

extends NTSid
Class Inheritance

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

Principals such as this NTSidUserPrincipal 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
NTSidUserPrincipal(String
a string version of the Windows NT SID for this user.
name
)

Create an NTSidUserPrincipal with a Windows NT SID.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

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

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

Implements java.security.Principal.equals.

Compares the specified Object with this NTSidUserPrincipal for equality.

public String

Returns:

a string representation of this NTSidUserPrincipal.
toString
()

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

Implements java.security.Principal.toString.

Return a string representation of this NTSidUserPrincipal.

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

NTSidUserPrincipalback to summary
public NTSidUserPrincipal(String name)

Create an NTSidUserPrincipal with a Windows NT SID.

Parameters
name:String

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

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 NTSidUserPrincipal for equality. Returns true if the given object is also a NTSidUserPrincipal and the two NTSidUserPrincipals have the same SID.

Parameters
o:Object

Object to be compared for equality with this NTSidUserPrincipal.

Returns:boolean

true if the specified Object is equal to this NTSidUserPrincipal.

toStringback to summary
public String toString()

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

Implements java.security.Principal.toString.

Return a string representation of this NTSidUserPrincipal.

Returns:String

a string representation of this NTSidUserPrincipal.