public class ActiveDirectoryPrincipal extends Object implements TomcatPrincipal
An Active Directory principal is comprised of the following items:
memberOf and retrieved from objectSid and
sIDHistory),String, byte[] or a
List of either one.| Constructor and Description |
|---|
ActiveDirectoryPrincipal(GSSName gssName,
Sid sid,
GSSCredential gssCredential)
Constructs a new principal for the given parameters.
|
ActiveDirectoryPrincipal(GSSName gssName,
Sid sid,
List<String> roles,
GSSCredential gssCredential,
Map<String,Object> additionalAttributes)
Constructs a new principal for the given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Map<String,Object> |
getAdditionalAttributes()
Holds additional attributes for a given principal which may be stored in Active Directory.
|
GSSCredential |
getGssCredential() |
GSSName |
getGssName()
Returns the underlying GSS name.
|
String |
getName() |
String[] |
getRoles()
Returns the role SID strings of the given principal.
|
Sid |
getSid()
Returns the security identifier (SID) of the principal.
|
Principal |
getUserPrincipal() |
int |
hashCode() |
boolean |
hasRole(String role)
Grants access if supplied role is associated with this principal.
|
void |
logout() |
String |
toString() |
public ActiveDirectoryPrincipal(GSSName gssName, Sid sid, GSSCredential gssCredential)
public Principal getUserPrincipal()
getUserPrincipal in interface TomcatPrincipalpublic GSSName getGssName()
public Sid getSid()
public GSSCredential getGssCredential()
getGssCredential in interface TomcatPrincipalpublic boolean hasRole(String role)
role - the role to checkpublic String[] getRoles()
public Map<String,Object> getAdditionalAttributes()
public boolean equals(Object obj)
public int hashCode()
public String toString()
public void logout()
throws Exception
logout in interface TomcatPrincipalExceptionCopyright © 2013–2020 Michael Osipov. All rights reserved.