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

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

public class NoInputCallbackHandler
extends Object
implements CallbackHandler

The username and password are given by the constructor No JNDI, datasource or file checks.

Author:
Florent Benoit (initial developer), Alexandre Thaveau (add the use of certificates), Marc-Antoine Bourgeot (add the use of certificates)

Constructor Summary
NoInputCallbackHandler()
          No default Constructor : must use the one with username and password.
NoInputCallbackHandler(String username, String password)
          Constructor.
NoInputCallbackHandler(String username, String password, Certificate cert)
          Constructor.
 
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

NoInputCallbackHandler

public NoInputCallbackHandler()
                       throws Exception
No default Constructor : must use the one with username and password.

Throws:
Exception - if someone try to use it

NoInputCallbackHandler

public NoInputCallbackHandler(String username,
                              String password)
Constructor.

Parameters:
username - username to store for the authentication
password - password to store for the authentication

NoInputCallbackHandler

public NoInputCallbackHandler(String username,
                              String password,
                              Certificate cert)
Constructor.

Parameters:
username - username to store for the authentication
password - password to store for the authentication
cert - the certificate for the authentication
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.