public class DefaultSecurityContext extends Object implements LoginSecurityContext
Constructor and Description |
---|
DefaultSecurityContext(Principal p,
Subject subject) |
DefaultSecurityContext(String principalName,
Subject subject) |
DefaultSecurityContext(Subject subject) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkGroup(Principal principal,
String role) |
Subject |
getSubject()
Returns the Subject representing the current authenticated user.
|
Principal |
getUserPrincipal() |
Set<Principal> |
getUserRoles()
Returns a set of Principals representing the roles
assigned to the current authenticated user Principal
|
static boolean |
isGroupPrincipal(Principal principal) |
boolean |
isUserInRole(String role) |
public DefaultSecurityContext(Subject subject)
public Principal getUserPrincipal()
getUserPrincipal
in interface SecurityContext
public boolean isUserInRole(String role)
isUserInRole
in interface SecurityContext
public Subject getSubject()
LoginSecurityContext
getSubject
in interface LoginSecurityContext
public Set<Principal> getUserRoles()
LoginSecurityContext
getUserRoles
in interface LoginSecurityContext
public static boolean isGroupPrincipal(Principal principal)
Apache CXF