SPT Core API

com.sptci.auth
Class DatabaseAuthoriser

java.lang.Object
  extended by com.sptci.auth.Authoriser
      extended by com.sptci.auth.DatabaseAuthoriser

public class DatabaseAuthoriser
extends Authoriser

A concrete sub-class of Authoriser used to implement authorisation against a database of users.

Copyright 2006, Sans Pareil Technologies, Inc.

Version:
$Id: DatabaseAuthoriser.java 4553 2008-12-24 10:34:16Z rakesh $
Author:
Rakesh Vidyadharan 2006-11-15

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sptci.auth.Authoriser
Authoriser.ManagerTask
 
Field Summary
 
Fields inherited from class com.sptci.auth.Authoriser
ALL_GROUPS, logger, userMap
 
Constructor Summary
DatabaseAuthoriser()
           
 
Method Summary
protected  boolean processAuthorisation(User user, String[] groups)
          Check the authorisation credentials of the specified user against the list of groups specified.
 
Methods inherited from class com.sptci.auth.Authoriser
checkAuthorisation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseAuthoriser

public DatabaseAuthoriser()
Method Detail

processAuthorisation

protected boolean processAuthorisation(User user,
                                       String[] groups)
Check the authorisation credentials of the specified user against the list of groups specified. The check is performed against the application database.

Specified by:
processAuthorisation in class Authoriser
Parameters:
user - The user object which is used to verify for group membership.
groups - The groups that are allowed access to the application.
Returns:
boolean Returns true if the user is a member of any of the groups specified.

SPT Core API