- java.lang.Object
-
- com.sun.security.auth.NTSid
-
- com.sun.security.auth.NTSidDomainPrincipal
-
- All Implemented Interfaces:
Serializable
,Principal
public class NTSidDomainPrincipal extends NTSid
This class extendsNTSid
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 particularSubject
to augment thatSubject
with an additional identity. Refer to theSubject
class for more information on how to achieve this. Authorization decisions can then be based upon the Principals associated with aSubject
.- See Also:
Principal
,Subject
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NTSidDomainPrincipal(String name)
Create anNTSidDomainPrincipal
with a Windows NT SID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Compares the specified Object with thisNTSidDomainPrincipal
for equality.String
toString()
Return a string representation of thisNTSidDomainPrincipal
.
-
-
-
Constructor Detail
-
NTSidDomainPrincipal
public NTSidDomainPrincipal(String name)
Create anNTSidDomainPrincipal
with a Windows NT SID.- Parameters:
name
- a string version of the Windows NT SID for this user's domain.- Throws:
NullPointerException
- if thename
isnull
.
-
-
Method Detail
-
toString
public String toString()
Return a string representation of thisNTSidDomainPrincipal
.
-
equals
public boolean equals(Object o)
Compares the specified Object with thisNTSidDomainPrincipal
for equality. Returns true if the given object is also aNTSidDomainPrincipal
and the two NTSidDomainPrincipals have the same SID.
-
-