Keel 2.1RC2

org.keel.services.authorization
Interface AuthorizationManager

All Known Implementing Classes:
ConfigAuthorizationManager, DBAuthorizationManager, NullAuthorizationManager

public interface AuthorizationManager

An AuthorizationManager is a service that is able to determine if the specified operation is allowed for the given user. How it determines this is entirely up to the implementation of the security manager. It is possible that a security manager implementation may "nest" other security managers - e.g. call other security managers and make sure that they all agree that the user has access to the given operation.

Author:
Michael Nash

Field Summary
static java.lang.String ROLE
           
 
Method Summary
 boolean allowed(java.lang.Object service, Context c)
          Same as allowed(Principal), but supplied with a Context, we can determine the subject on our own by reading it from the UserEnvironment
 boolean allowed(java.lang.Object service, UserEnvironment ue)
          If we don't specify an operation, determine if the user is allowed to do *anything* with this service.
 boolean allowed(Operation o, Context c)
          If we are supplied with a context then we can determine the subject by getting the UserEnvironment from the context.
 boolean allowed(Operation o, UserEnvironment ue)
          Is the specified operation allowed for the given principal?
 

Field Detail

ROLE

public static final java.lang.String ROLE
See Also:
Constant Field Values
Method Detail

allowed

public boolean allowed(Operation o,
                       UserEnvironment ue)
                throws AuthorizationException
Is the specified operation allowed for the given principal?

Throws:
AuthorizationException

allowed

public boolean allowed(Operation o,
                       Context c)
                throws AuthorizationException
If we are supplied with a context then we can determine the subject by getting the UserEnvironment from the context.

Throws:
AuthorizationException

allowed

public boolean allowed(java.lang.Object service,
                       UserEnvironment ue)
                throws AuthorizationException
If we don't specify an operation, determine if the user is allowed to do *anything* with this service. This is used for securing the entire service - e.g. a Model

Throws:
AuthorizationException

allowed

public boolean allowed(java.lang.Object service,
                       Context c)
                throws AuthorizationException
Same as allowed(Principal), but supplied with a Context, we can determine the subject on our own by reading it from the UserEnvironment

Throws:
AuthorizationException

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.