public class RunAsIdentity extends SimplePrincipal implements Cloneable, RunAs
Constructor and Description |
---|
RunAsIdentity(String roleName,
String principalName)
Construct an inmutable instance of a RunAsIdentity
|
RunAsIdentity(String roleName,
String principalName,
Set<String> extraRoleNames)
Construct an inmutable instance of a RunAsIdentity
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
boolean |
doesUserHaveRole(Principal role) |
boolean |
doesUserHaveRole(Set<Principal> methodRoles)
True if the run-as principal has any of the method roles
|
<T> T |
getIdentity()
Return the identity represented
|
Set<Principal> |
getPrincipalsSet()
Return a set with the configured run-as principal and a Group("Roles")
with the run-as roles
|
<T> T |
getProof()
Return the proof of identity
|
Set<Principal> |
getRunAsRoles()
Return a set with the configured run-as role
|
RoleGroup |
getRunAsRolesAsRoleGroup()
Return a RoleGroup of Run-As roles
|
String |
toString()
Returns a string representation of the object.
|
equals, getName, hashCode
public RunAsIdentity(String roleName, String principalName)
public Set<Principal> getRunAsRoles()
public RoleGroup getRunAsRolesAsRoleGroup()
public Set<Principal> getPrincipalsSet()
public boolean doesUserHaveRole(Principal role)
public boolean doesUserHaveRole(Set<Principal> methodRoles)
public String toString()
toString
in interface Principal
toString
in class SimplePrincipal
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public <T> T getIdentity()
RunAs
getIdentity
in interface RunAs
Copyright © 2019 JBoss by Red Hat. All rights reserved.