at.spardat.xma.security
Class XMACallbackHandler

java.lang.Object
  extended byat.spardat.xma.security.XMACallbackHandler
All Implemented Interfaces:
javax.security.auth.callback.CallbackHandler, java.util.EventListener, org.eclipse.swt.events.SelectionListener, org.eclipse.swt.internal.SWTEventListener

public class XMACallbackHandler
extends java.lang.Object
implements javax.security.auth.callback.CallbackHandler, org.eclipse.swt.events.SelectionListener

Generic callback handler. This callback handler is passed to every LoginModule which is used as client side authentication plugin. It supports NameCallback, PasswordCallback, TextInputCallback, TextOutputCallback, ChallengeCallback. From the callbacks defined in JAAS only LanguageCallback is not supported. For every CallengeCallback a server communication is established and the server side authentication plugin is asked for a challenge by calling LoginModuleServer.getPreLoginInfo(javax.servlet.http.HttpSession) via the LoginServlet. All other callbacks are handled with user interface dialog which contains an input field for every callback.


Constructor Summary
XMACallbackHandler(XMASessionClient session)
          Constructor This method is intended to be called only be the XMA runtime.
 
Method Summary
 boolean getExitstatus()
          Returns the exitStatus of the login dialog.
 XMASessionClient getSession()
           
 void handle(javax.security.auth.callback.Callback[] callbacks)
          Handle the callbacks.
 void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)
          Eventmethod called by SWT every time a widget is double clicked.
 void widgetSelected(org.eclipse.swt.events.SelectionEvent e)
          Eventmethod called by SWT every time a widget is selcted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMACallbackHandler

public XMACallbackHandler(XMASessionClient session)
Constructor This method is intended to be called only be the XMA runtime.

Parameters:
session - the XMA session it belongs to.
Method Detail

handle

public void handle(javax.security.auth.callback.Callback[] callbacks)
            throws javax.security.auth.callback.UnsupportedCallbackException
Handle the callbacks. This includes user interaction if callbacks contains any NameCallback, PasswordCallback, TextInputCallback or TextOutputCallback. It includes server communication if callbacks contains a ChallengeCallback. Other callbacks are not supported.

Specified by:
handle in interface javax.security.auth.callback.CallbackHandler
Parameters:
callbacks - the callbacks to handle.
Throws:
javax.security.auth.callback.UnsupportedCallbackException - if callbacks contains any unsupported Callback.

widgetSelected

public void widgetSelected(org.eclipse.swt.events.SelectionEvent e)
Eventmethod called by SWT every time a widget is selcted. This method is intended to by called by SWT only!

Specified by:
widgetSelected in interface org.eclipse.swt.events.SelectionListener
Parameters:
e - the event object passed by SWT.

widgetDefaultSelected

public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)
Eventmethod called by SWT every time a widget is double clicked. This method is intended to by called by SWT only!

Specified by:
widgetDefaultSelected in interface org.eclipse.swt.events.SelectionListener
Parameters:
e - the event object passed by SWT.

getSession

public XMASessionClient getSession()
Returns:
the XMASession this callback handler belongs to.

getExitstatus

public boolean getExitstatus()
Returns the exitStatus of the login dialog.
true means ok pressed
false means cancel pressesd