Package com.spotfire.server.jaas.util
Class AutoCallbackHandler
java.lang.Object
com.spotfire.server.jaas.util.AutoCallbackHandler
- All Implemented Interfaces:
CallbackHandler
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:
- 3.0
-
Constructor Summary
ConstructorsConstructorDescriptionAutoCallbackHandler(String username, String password) Creates a newAutoCallbackHandlerinstance. -
Method Summary
-
Constructor Details
-
AutoCallbackHandler
Creates a newAutoCallbackHandlerinstance.- Parameters:
username- the username, which may benullpassword- the password, which may benull- Since:
- 3.0
-
-
Method Details
-
handle
Thehandlemethod processes the given callbacks. The constructor argumentusernameis used to set thenameproperty of any givenNameCallbackand the constructor argumentpasswordis used to set thepasswordproperty of any givenPasswordCallback.- Specified by:
handlein interfaceCallbackHandler- Parameters:
callbacks- aCallback[]value- Throws:
UnsupportedCallbackException- if a givenCallbackis unsupported- Since:
- 3.0
-