java.lang.Object
waffle.servlet.WindowsPrincipal
- All Implemented Interfaces:
Serializable,Principal
- Direct Known Subclasses:
AutoDisposableWindowsPrincipal
A Windows Principal.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWindowsPrincipal(IWindowsIdentity windowsIdentity) A windows principal.WindowsPrincipal(IWindowsIdentity windowsIdentity, PrincipalFormat principalFormat, PrincipalFormat roleFormat) A windows principal. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWindows groups that the user is a member of.Underlying identity.getName()Fully qualified name.Get an array of roles as a string.byte[]getSid()Byte representation of the SID.String representation of the SID.inthashCode()booleanChecks whether the principal has a given role.toString()
-
Constructor Details
-
WindowsPrincipal
A windows principal.- Parameters:
windowsIdentity- Windows identity.
-
WindowsPrincipal
public WindowsPrincipal(IWindowsIdentity windowsIdentity, PrincipalFormat principalFormat, PrincipalFormat roleFormat) A windows principal.- Parameters:
windowsIdentity- Windows identity.principalFormat- Principal format.roleFormat- Role format.
-
-
Method Details
-
getSid
public byte[] getSid()Byte representation of the SID.- Returns:
- Array of bytes.
-
getSidString
-
getGroups
Windows groups that the user is a member of.- Returns:
- A map of group names to groups.
-
getRolesString
-
hasRole
Checks whether the principal has a given role.- Parameters:
role- Role name.- Returns:
- True if the principal has a role, false otherwise.
-
getName
-
getIdentity
-
toString
-
equals
-
hashCode
-