org.jboss.security.authorization
Interface AuthorizationModule


public interface AuthorizationModule

Represents a Policy Decision Module that is used by the Authorization Context

Since:
Jun 11, 2006
Version:
$Revision: 45685 $
Author:
Anil Saldhana

Method Summary
 boolean abort()
          Abort the Authorization Process
 int authorize(Resource resource)
          Authorize the resource
 boolean commit()
          Overall authorization process has succeeded.
 boolean destroy()
          A final cleanup opportunity offered
 void initialize(Subject subject, CallbackHandler handler, Map<String,Object> sharedState, Map<String,Object> options, RoleGroup roles)
          Initialize the module
 

Method Detail

abort

boolean abort()
              throws AuthorizationException
Abort the Authorization Process

Returns:
true - abort passed, false-otherwise
Throws:
AuthorizationException

commit

boolean commit()
               throws AuthorizationException
Overall authorization process has succeeded. The module can commit any decisions it has made, with third party systems like a database.

Returns:
Throws:
AuthorizationException

initialize

void initialize(Subject subject,
                CallbackHandler handler,
                Map<String,Object> sharedState,
                Map<String,Object> options,
                RoleGroup roles)
Initialize the module

Parameters:
subject - the authenticated subject
handler - CallbackHandler
sharedState - state shared with other configured modules
options - options specified in the Configuration for this particular module
roles - Roles of the subject

authorize

int authorize(Resource resource)
Authorize the resource

Parameters:
resource -
Returns:
AuthorizationContext.PERMIT or AuthorizationContext.DENY

destroy

boolean destroy()
A final cleanup opportunity offered

Returns:
cleanup by the module passed or not


Copyright © 2009 JBoss Inc.. All Rights Reserved.