org.ow2.jonas.security.auth.callback
Class DialogCallbackHandler

java.lang.Object
  extended by org.ow2.jonas.security.auth.callback.DialogCallbackHandler
All Implemented Interfaces:
CallbackHandler

public class DialogCallbackHandler
extends Object
implements CallbackHandler

Uses a Swing dialog window to query the user for answers to authentication questions. This can be used by a JAAS application to instantiate a CallbackHandler

Author:
Jeremie Laurent, Yann Petiot, Frederic Rinaldi, Florent Benoit. Integration in the JOnAS 3.1.2 tree

Constructor Summary
DialogCallbackHandler()
          The constructor to create a callback dialog with the default parent window.
DialogCallbackHandler(String title)
          The constructor to create a callback dialog with the default parent window.
DialogCallbackHandler(String title, String username, String password)
          The constructor to create a callback dialog with the default parent window.
DialogCallbackHandler(String title, String username, String password, String loginButton, String cancelButton, int usernameLength, int passwordLength, char echoChar)
          The constructor to create a callback dialog with the default parent window.
 
Method Summary
 void handle(Callback[] callbacks)
          Invoke an array of Callbacks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialogCallbackHandler

public DialogCallbackHandler()
The constructor to create a callback dialog with the default parent window.


DialogCallbackHandler

public DialogCallbackHandler(String title)
The constructor to create a callback dialog with the default parent window.

Parameters:
title - the title of the dialog box

DialogCallbackHandler

public DialogCallbackHandler(String title,
                             String username,
                             String password)
The constructor to create a callback dialog with the default parent window.

Parameters:
title - the title of the dialog box
username - the label of the username label
password - the label of the password label

DialogCallbackHandler

public DialogCallbackHandler(String title,
                             String username,
                             String password,
                             String loginButton,
                             String cancelButton,
                             int usernameLength,
                             int passwordLength,
                             char echoChar)
The constructor to create a callback dialog with the default parent window.

Parameters:
title - the title of the dialog box
username - the label of the username label
password - the label of the password label
loginButton - the label of the login button
cancelButton - the label of the cancel button
usernameLength - the length of the username field
passwordLength - the length of the password field
echoChar - the character to display when entering the password implies that echoCharOn = true
Method Detail

handle

public void handle(Callback[] callbacks)
            throws IOException,
                   UnsupportedCallbackException
Invoke an array of Callbacks.

Specified by:
handle in interface CallbackHandler
Parameters:
callbacks - an array of Callback objects which contain the information requested by an underlying security service to be retrieved or displayed.
Throws:
IOException - if an input or output error occurs.

UnsupportedCallbackException - if the implementation of this method does not support one or more of the Callbacks specified in the callbacks parameter.


Copyright © 2010 OW2 Consortium. All Rights Reserved.