public abstract class Authoriser extends Object
Copyright 2006, Sans Pareil Technologies, Inc.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
Authoriser.ManagerTask
A
TimerTask that is used to clear the userMap periodically. |
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
Authoriser() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected static final Logger logger
protected static final String ALL_GROUPS
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.