|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.examples.authorization.SimpleFileAuthorizer
A simple file-based implementation of the AccessAuthorizer
interface which loads an access control list from a file.
Field Summary | |
protected java.util.Map |
activityAuthorization
Maps an activity name to a set of users that are authorized to access the activity. |
protected java.util.Map |
resourceAuthorization
Maps a resource ID to a set of users that are authorized to access the resource. |
Constructor Summary | |
SimpleFileAuthorizer(java.lang.String config)
Constructor. |
Method Summary | |
boolean |
authorizeActivity(java.lang.String resourceID,
Activity activity,
SecurityContext context)
Authorizes access to an activity based on an access control list. |
boolean |
authorizeResource(java.lang.String resourceID,
SecurityContext context)
Authorizes access to a resource based on an access control list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Map resourceAuthorization
protected java.util.Map activityAuthorization
Constructor Detail |
public SimpleFileAuthorizer(java.lang.String config) throws java.lang.Exception
config
- location of the configuration file
java.lang.Exception
Method Detail |
public boolean authorizeResource(java.lang.String resourceID, SecurityContext context)
authorizeResource
in interface AccessAuthorizer
resourceID
- resource to be accessedcontext
- security context of the request
public boolean authorizeActivity(java.lang.String resourceID, Activity activity, SecurityContext context)
authorizeActivity
in interface AccessAuthorizer
resourceID
- resource identifieractivity
- activity object to be accessedcontext
- context of the request
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |