com.spotfire.server.jaas.util
Class AutoCallbackHandler

java.lang.Object
  extended by com.spotfire.server.jaas.util.AutoCallbackHandler

public class AutoCallbackHandler
extends Object

The AutoCallbackHandler is a utility class that can be used by all JAAS clients. It automatically handles Callback processing without requiring any user interaction, which makes it suitable for web application environments, where the user interaction has special requirements.

The constructor takes one username and one password argument. The username is used to set the name property of a NameCallback and the password is used to set the password property of a PasswordCallback. Both constructor arguments may be null.

The supported Callback implementations are NameCallback and PasswordCallback. The handle throws an UnsupportedCallbackException for all other Callback classes.

Since:
DSS 7.3

Constructor Summary
AutoCallbackHandler(String username, String password)
          Creates a new AutoCallbackHandler instance.
 
Method Summary
 void handle(Callback[] callbacks)
          The handle method processes the given callbacks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoCallbackHandler

public AutoCallbackHandler(String username,
                           String password)
Creates a new AutoCallbackHandler instance.

Parameters:
username - the username, which may be null
password - the password, which may be null
Method Detail

handle

public void handle(Callback[] callbacks)
The handle method processes the given callbacks. The constructor argument username is used to set the name property of any given NameCallback and the constructor argument password is used to set the password property of any given PasswordCallback.

Parameters:
callbacks - a Callback[] value
Throws:
UnsupportedCallbackException - if a given Callback is unsupported


Copyright © 2000-2009 TIBCO Software Inc. All Rights Reserved.