org.jboss.security.plugins
public class JBossAuthorizationManager extends Object implements AuthorizationManager
Constructor and Description |
---|
JBossAuthorizationManager(String securityDomainName) |
Modifier and Type | Method and Description |
---|---|
int |
authorize(Resource resource) |
int |
authorize(Resource resource,
Subject subject) |
int |
authorize(Resource resource,
Subject subject,
Group roleGroup) |
int |
authorize(Resource resource,
Subject subject,
RoleGroup role) |
protected boolean |
doesRoleGroupHaveRole(Principal role,
RoleGroup userRoles)
Check that the indicated application domain role is a member of the
user's assigned roles.
|
boolean |
doesUserHaveRole(Principal principal,
Principal role)
Does the current Subject have a role(a Principal) that equates to one
of the role names.
|
boolean |
doesUserHaveRole(Principal principal,
Set<Principal> rolePrincipals)
Does the current Subject have a role(a Principal) that equates to one
of the role names.
|
String |
getSecurityDomain() |
RoleGroup |
getSubjectRoles(Subject authenticatedSubject,
CallbackHandler cbh) |
Group |
getTargetRoles(Principal targetPrincipal,
Map<String,Object> contextMap) |
Set<Principal> |
getUserRoles(Principal principal)
Return the set of domain roles the current active Subject 'Roles' group
found in the subject Principals set.
|
void |
setAuthorizationContext(AuthorizationContext authorizationContext)
Set the AuthorizationContext
|
String |
toString() |
public JBossAuthorizationManager(String securityDomainName)
public int authorize(Resource resource) throws AuthorizationException
authorize
in interface AuthorizationManager
AuthorizationException
AuthorizationManager.authorize(Resource)
public int authorize(Resource resource, Subject subject) throws AuthorizationException
authorize
in interface AuthorizationManager
AuthorizationException
AuthorizationManager.authorize(Resource, Subject)
public int authorize(Resource resource, Subject subject, RoleGroup role) throws AuthorizationException
authorize
in interface AuthorizationManager
AuthorizationException
AuthorizationManager.authorize(Resource, Subject, RoleGroup)
public int authorize(Resource resource, Subject subject, Group roleGroup) throws AuthorizationException
authorize
in interface AuthorizationManager
AuthorizationException
AuthorizationManager.authorize(Resource, Subject, Group)
public boolean doesUserHaveRole(Principal principal, Set<Principal> rolePrincipals)
doesUserHaveRole
in interface AuthorizationManager
principal
- - ignored. The current authenticated Subject determines
the active user and assigned user roles.rolePrincipals
- - a Set of Principals for the roles to check.Group;
,
Subject.getPrincipals()
public boolean doesUserHaveRole(Principal principal, Principal role)
principal
- - ignored. The current authenticated Subject determines
the active user and assigned user roles.role
- - the application domain role that the principal is to be
validated against.doesUserHaveRole(Principal, Set)
public Set<Principal> getUserRoles(Principal principal)
getUserRoles
in interface AuthorizationManager
principal
- - ignored. The current authenticated Subject determines
the active user and assigned user roles.protected boolean doesRoleGroupHaveRole(Principal role, RoleGroup userRoles)
role
- , the application domain role required for accessuserRoles
- , the set of roles assigned to the userpublic void setAuthorizationContext(AuthorizationContext authorizationContext)
public String getSecurityDomain()
getSecurityDomain
in interface BaseSecurityManager
public Group getTargetRoles(Principal targetPrincipal, Map<String,Object> contextMap)
getTargetRoles
in interface AuthorizationManager
AuthorizationManager.getTargetRoles(Principal, Map)
public RoleGroup getSubjectRoles(Subject authenticatedSubject, CallbackHandler cbh)
getSubjectRoles
in interface AuthorizationManager
AuthorizationManager.getSubjectRoles(Subject, CallbackHandler)
Copyright © 2015 JBoss Inc.. All Rights Reserved.