Package waffle.apache
Class GenericWindowsPrincipal
java.lang.Object
org.apache.catalina.realm.GenericPrincipal
waffle.apache.GenericWindowsPrincipal
- All Implemented Interfaces:
Serializable
,Principal
,org.apache.catalina.TomcatPrincipal
public class GenericWindowsPrincipal
extends org.apache.catalina.realm.GenericPrincipal
A Windows Principal.
- See Also:
-
Field Summary
Fields inherited from class org.apache.catalina.realm.GenericPrincipal
attributes, gssCredential, loginContext, name, roles, userPrincipal
-
Constructor Summary
ConstructorDescriptionGenericWindowsPrincipal
(IWindowsIdentity windowsIdentity, PrincipalFormat principalFormat, PrincipalFormat roleFormat) A windows principal. -
Method Summary
Modifier and TypeMethodDescriptionWindows groups that the user is a member of.Get an array of roles as a string.byte[]
getSid()
Byte representation of the SID.String representation of the SID.Methods inherited from class org.apache.catalina.realm.GenericPrincipal
getAttribute, getAttributeNames, getGssCredential, getName, getRoles, getUserPrincipal, hasRole, logout, setGssCredential, toString
-
Constructor Details
-
GenericWindowsPrincipal
public GenericWindowsPrincipal(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
String representation of the SID.- Returns:
- String.
-
getGroups
Windows groups that the user is a member of.- Returns:
- A map of group names to groups.
-
getRolesString
Get an array of roles as a string.- Returns:
- Role1, Role2, ...
-