org.jboss.security.authorization.modules
public abstract class AbstractAuthorizationModule extends Object implements AuthorizationModule
Modifier and Type | Field and Description |
---|---|
protected static Map<String,Class<?>> |
clazzMap
A map that is available to reduce the loadClass synchronization
|
protected Map<ResourceType,String> |
delegateMap
Map of delegates for the various layers
|
protected CallbackHandler |
handler |
protected Map<String,Object> |
options |
protected RoleGroup |
role |
protected Map<String,Object> |
sharedState |
protected Subject |
subject |
Constructor and Description |
---|
AbstractAuthorizationModule() |
Modifier and Type | Method and Description |
---|---|
boolean |
abort() |
abstract int |
authorize(Resource resource) |
boolean |
commit() |
boolean |
destroy() |
protected AuthorizationModuleDelegate |
getDelegate(String delegateStr)
Load the delegate
|
void |
initialize(Subject subject,
CallbackHandler handler,
Map<String,Object> sharedState,
Map<String,Object> options,
RoleGroup subjectRole) |
protected int |
invokeDelegate(Resource resource)
Subclasses can use this method to leave the authorization
decision to the delegate configured
|
protected void |
populateDelegateMap(String commaSeparatedDelegates)
Options may have a comma separated delegate map
|
String |
toString()
Override to print more details
|
protected Subject subject
protected CallbackHandler handler
protected RoleGroup role
protected Map<ResourceType,String> delegateMap
public abstract int authorize(Resource resource)
authorize
in interface AuthorizationModule
AuthorizationModule.authorize(Resource)
public boolean abort() throws AuthorizationException
abort
in interface AuthorizationModule
AuthorizationException
AuthorizationModule.abort()
public boolean commit() throws AuthorizationException
commit
in interface AuthorizationModule
AuthorizationException
AuthorizationModule.commit()
public boolean destroy()
destroy
in interface AuthorizationModule
AuthorizationModule.destroy()
public void initialize(Subject subject, CallbackHandler handler, Map<String,Object> sharedState, Map<String,Object> options, RoleGroup subjectRole)
public String toString()
protected int invokeDelegate(Resource resource)
protected AuthorizationModuleDelegate getDelegate(String delegateStr) throws Exception
delegateStr
- FQN of the delegateException
protected void populateDelegateMap(String commaSeparatedDelegates)
commaSeparatedDelegates
- Copyright © 2015 JBoss Inc.. All Rights Reserved.