Class LoginCallbackHandler
- java.lang.Object
-
- com.sun.enterprise.security.auth.login.LoginCallbackHandler
-
- All Implemented Interfaces:
CallbackHandler
public class LoginCallbackHandler extends Object implements CallbackHandler
This is the default callback handler provided by the application client container. The container tries to use the application specified callback handler (if provided). If there is no callback handler or if the handler cannot be instantiated then this default handler is used. Note: User-defined Callback Handlers which intend to indicate cancel status must extend this class and set the ThreadLocal cancelStatus.
-
-
Field Summary
Fields Modifier and Type Field Description protected ThreadLocal<Boolean>
cancelStatus
-
Constructor Summary
Constructors Constructor Description LoginCallbackHandler()
LoginCallbackHandler(boolean gui)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getCancelStatus()
Check whether the authentication was cancelled by the user.void
handle(Callback[] callbacks)
This is the callback method called when authentication data is required.
-
-
-
Field Detail
-
cancelStatus
protected ThreadLocal<Boolean> cancelStatus
-
-
Method Detail
-
getCancelStatus
public boolean getCancelStatus()
Check whether the authentication was cancelled by the user.- Returns:
- boolean indicating whether the authentication was cancelled.
-
handle
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
This is the callback method called when authentication data is required. It either pops up a dialog box to request authentication data or use text input.- Specified by:
handle
in interfaceCallbackHandler
- Parameters:
the
- callback object instances supported by the login module.- Throws:
IOException
UnsupportedCallbackException
-
-