|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sptci.auth.Authoriser
public abstract class Authoriser
An abstract authoriser used to implement authorisation for application components.
Copyright 2006, Sans Pareil Technologies, Inc.
| Nested Class Summary | |
|---|---|
protected static class |
Authoriser.ManagerTask
A TimerTask that is used to clear the userMap periodically. |
| Field Summary | |
|---|---|
protected static String |
ALL_GROUPS
The special group name to denote that all authenticated users are allowed access. |
protected static Logger |
logger
The logger that is used to log errors or other messages. |
protected static Map<String,Boolean> |
userMap
A Map used to cache userName and
authorisation values. |
| Constructor Summary | |
|---|---|
Authoriser()
|
|
| Method Summary | |
|---|---|
boolean |
checkAuthorisation(User user,
String[] groups)
Check the authorisation credentials of the specified user against the list of groups specified. |
protected abstract boolean |
processAuthorisation(User user,
String[] groups)
Process the authorisation request by checking the specified user for membership in the list of groups specified. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Logger logger
protected static final String ALL_GROUPS
protected static final Map<String,Boolean> userMap
Map used to cache userName and
authorisation values. Users who do not exist
will be stored with a false authorisation status.
| Constructor Detail |
|---|
public Authoriser()
| Method Detail |
|---|
public boolean checkAuthorisation(User user,
String[] groups)
user - The user object which is used to verify for group
membership.groups - The groups that are allowed access to the application.
true if the user is a member
of any of the groups specified.processAuthorisation(com.sptci.auth.User, java.lang.String[])
protected abstract boolean processAuthorisation(User user,
String[] groups)
user - The user object which is used to verify for group
membership.groups - The groups that are allowed access to the application.
true if the user is a member
of any of the groups specified.
|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||