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

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

public class NoInputCallbackHandler
extends java.lang.Object
implements javax.security.auth.callback.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(java.lang.String username, java.lang.String password)
          Constructor
NoInputCallbackHandler(java.lang.String username, java.lang.String password, java.security.cert.Certificate cert)
          Constructor
 
Method Summary
 void handle(javax.security.auth.callback.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 java.lang.Exception
No default Constructor : must use the one with username and password

Throws:
java.lang.Exception - if someone try to use it

NoInputCallbackHandler

public NoInputCallbackHandler(java.lang.String username,
                              java.lang.String password)
Constructor

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

NoInputCallbackHandler

public NoInputCallbackHandler(java.lang.String username,
                              java.lang.String password,
                              java.security.cert.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(javax.security.auth.callback.Callback[] callbacks)
            throws java.io.IOException,
                   javax.security.auth.callback.UnsupportedCallbackException
Invoke an array of Callbacks.

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

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