at.spardat.xma.plugins.dummy
Class DummyLoginModule

java.lang.Object
  extended byat.spardat.xma.plugins.dummy.DummyLoginModule
All Implemented Interfaces:
javax.security.auth.spi.LoginModule

public class DummyLoginModule
extends java.lang.Object
implements javax.security.auth.spi.LoginModule

Dummy implementation of a cliend side authentication plugin (JAAS LoginModule). This implementation takes no username or password. It allways logs in as user "Dummy" in the mandant "188". The user is implemented as DummyContext.


Constructor Summary
DummyLoginModule()
           
 
Method Summary
 boolean abort()
          aborts the login process the DummyContext is thrown away
 boolean commit()
          commits the login process the DummyContext is set into the subject.
 void initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler handler, java.util.Map sharedState, java.util.Map options)
          initialzes the login module.
 boolean login()
          do a login.
 boolean logout()
          do a logout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyLoginModule

public DummyLoginModule()
Method Detail

abort

public boolean abort()
              throws javax.security.auth.login.LoginException
aborts the login process the DummyContext is thrown away

Specified by:
abort in interface javax.security.auth.spi.LoginModule
Returns:
allways true
Throws:
LoginExcption - is never thrown
javax.security.auth.login.LoginException

commit

public boolean commit()
               throws javax.security.auth.login.LoginException
commits the login process the DummyContext is set into the subject.

Specified by:
commit in interface javax.security.auth.spi.LoginModule
Returns:
allways true
Throws:
LoginExcption - is never thrown
javax.security.auth.login.LoginException

initialize

public void initialize(javax.security.auth.Subject subject,
                       javax.security.auth.callback.CallbackHandler handler,
                       java.util.Map sharedState,
                       java.util.Map options)
initialzes the login module. subject and handler are stored.

Specified by:
initialize in interface javax.security.auth.spi.LoginModule
Parameters:
subject - the subject to store the user data
handler - ignored
sharedState - ignored
options - ignored

login

public boolean login()
              throws javax.security.auth.login.LoginException
do a login. creates the DummyContext.

Specified by:
login in interface javax.security.auth.spi.LoginModule
Returns:
allways true
Throws:
LoginExcption - is never thrown
javax.security.auth.login.LoginException

logout

public boolean logout()
               throws javax.security.auth.login.LoginException
do a logout. the DummyContext is removed from the subject.

Specified by:
logout in interface javax.security.auth.spi.LoginModule
Returns:
allways true
Throws:
LoginExcption - is never thrown
javax.security.auth.login.LoginException