Package javax.security.auth.callback
Interface CallbackHandler
public interface CallbackHandler
Needs to be implemented by classes that want to handle authentication
Callbacks. A single method handle(Callback[]) must be
provided that checks the type of the incoming Callbacks and reacts
accordingly. CallbackHandlers can be installed per application. It is
also possible to configure a system-default CallbackHandler by
setting the auth.login.defaultCallbackHandler property in the
standard security.properties file.-
Method Summary
-
Method Details
-
handle
Handles the actualCallback. ACallbackHandlerneeds to implement this method. In the method, it is free to select whichCallbacks it actually wants to handle and in which way. For example, a console-basedCallbackHandlermight choose to sequentially ask the user for login and password, if it implements theseCallbacks, whereas a GUI-based one might open a single dialog window for both values. If aCallbackHandleris not able to handle a specificCallback, it needs to throw anUnsupportedCallbackException.- Parameters:
callbacks- the array ofCallbacks that need handling- Throws:
IOException- if an I/O related error occursUnsupportedCallbackException- if theCallbackHandleris not able to handle a specificCallback
-