at.spardat.xma.plugins.dummy
Class DummyAuthorisation

java.lang.Object
  extended byat.spardat.xma.plugins.dummy.DummyAuthorisation
All Implemented Interfaces:
at.spardat.xma.security.Authorisation

public class DummyAuthorisation
extends java.lang.Object
implements at.spardat.xma.security.Authorisation

Dummy implementation of an authorisation plugin. This implementation allows everything to every authenticated user. All numerical values are zero. This plugin can be used on client and server side.


Constructor Summary
DummyAuthorisation()
           
 
Method Summary
 double getDoubleValue(javax.security.auth.Subject subject, java.lang.String function)
          Return the numeric value associated with the given user and the given function. e.g. a money limit.
 long getLongValue(javax.security.auth.Subject subject, java.lang.String function)
          Return the numeric value associated with the given user and the given function. e.g. a money limit.
 boolean isAuthorized(javax.security.auth.Subject subject, java.lang.String function)
          Check if the given user is alowed to perform the given function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyAuthorisation

public DummyAuthorisation()
Method Detail

isAuthorized

public boolean isAuthorized(javax.security.auth.Subject subject,
                            java.lang.String function)
Check if the given user is alowed to perform the given function. Every authenticated user is allowed every function.

Specified by:
isAuthorized in interface at.spardat.xma.security.Authorisation
Parameters:
subject - the subject as returned by the DummyLoginModule
function - a String identifying the desired operation
Returns:
true if the subject is really form the DummyLoginModule

getLongValue

public long getLongValue(javax.security.auth.Subject subject,
                         java.lang.String function)
Return the numeric value associated with the given user and the given function. e.g. a money limit.

Parameters:
subject - the subject as returned by the DummyLoginModule
function - a String identifying the desired operation
Returns:
0

getDoubleValue

public double getDoubleValue(javax.security.auth.Subject subject,
                             java.lang.String function)
Return the numeric value associated with the given user and the given function. e.g. a money limit.

Parameters:
subject - the subject as returned by the DummyLoginModule
function - a String identifying the desired operation
Returns:
0