public class JBossAuthorizationContext extends AuthorizationContext
callbackHandler, DENY, PERMIT, securityDomainName, sharedState
Constructor and Description |
---|
JBossAuthorizationContext(String name) |
JBossAuthorizationContext(String name,
CallbackHandler handler) |
JBossAuthorizationContext(String name,
Subject subject,
CallbackHandler handler) |
Modifier and Type | Method and Description |
---|---|
int |
authorize(Resource resource)
Authorize the Resource
|
int |
authorize(Resource resource,
Subject subject,
RoleGroup callerRoles)
Authorize the resource
|
void |
setApplicationPolicy(ApplicationPolicy appPolicy)
Inject an ApplicationPolicy that contains AuthorizationInfo
|
getSecurityDomain
public JBossAuthorizationContext(String name)
public JBossAuthorizationContext(String name, CallbackHandler handler)
public JBossAuthorizationContext(String name, Subject subject, CallbackHandler handler)
public void setApplicationPolicy(ApplicationPolicy appPolicy)
appPolicy
- IllegalArgumentException
- if ApplicationPolicy is null or
does not contain AuthorizationInfo or domain name does not matchpublic int authorize(Resource resource) throws AuthorizationException
authorize
in class AuthorizationContext
resource
- AuthorizationException
public int authorize(Resource resource, Subject subject, RoleGroup callerRoles) throws AuthorizationException
AuthorizationContext
authorize
in class AuthorizationContext
subject
- Subject of the callercallerRoles
- Roles of the callerAuthorizationException
AuthorizationContext.authorize(org.jboss.security.authorization.Resource, javax.security.auth.Subject, org.jboss.security.identity.RoleGroup)
Copyright © 2020 JBoss by Red Hat. All rights reserved.