at.spardat.xma.security
Class XMALoginContext

java.lang.Object
  extended byat.spardat.xma.security.XMALoginContext

public class XMALoginContext
extends java.lang.Object

xma specific login context. This class is used for client side login instead of the JAAS standard class javax.security.auth.login.LoginContext. This substitution is neccessary to be able to use the xma plugin mechanism for configuration an loading of LoginModules. XMALoginContext uses LoginModules with are complient to the JAAS-Standard.


Constructor Summary
XMALoginContext(javax.security.auth.callback.CallbackHandler handler, PluginManager manager, java.util.Map options)
          Creates a XMALoginContext, loads the configured LoginModule using the xma plugin mechanism and initializes the LoginModule.
 
Method Summary
 javax.security.auth.spi.LoginModule getModule()
          Gets the used login module.
 javax.security.auth.Subject getSubject()
          Gets the authenticated Subject.
 void login()
          Does a client side login using its LoginModule.
 void logout()
          Does a client side logout using its LoginModule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMALoginContext

public XMALoginContext(javax.security.auth.callback.CallbackHandler handler,
                       PluginManager manager,
                       java.util.Map options)
                throws javax.security.auth.login.LoginException
Creates a XMALoginContext, loads the configured LoginModule using the xma plugin mechanism and initializes the LoginModule.

Parameters:
handler - handler for callbacks
manager - plugin manager to lookup module
Throws:
javax.security.auth.login.LoginException - on login failures
Method Detail

login

public void login()
           throws javax.security.auth.login.LoginException
Does a client side login using its LoginModule.

Throws:
javax.security.auth.login.LoginException - on login failures

logout

public void logout()
            throws javax.security.auth.login.LoginException
Does a client side logout using its LoginModule.

Throws:
javax.security.auth.login.LoginException - on logout failures

getSubject

public javax.security.auth.Subject getSubject()
Gets the authenticated Subject. The subject will only contain user information after a sucessfull login.

Returns:
Subject the subject

getModule

public final javax.security.auth.spi.LoginModule getModule()
Gets the used login module.