org.keel.services.authentication
Class LoginCallbackHandler
java.lang.Object
org.keel.services.authentication.LoginCallbackHandler
- All Implemented Interfaces:
- javax.security.auth.callback.CallbackHandler
- public class LoginCallbackHandler
- extends java.lang.Object
- implements javax.security.auth.callback.CallbackHandler
LoginCallbackHandler has constructor that takes a username, password, domain and boolean for login remember so its handle() method does not have to prompt the user for input. Useful for server-side applications.
- Version:
- 1.0
- Author:
- Paul Feuer and John Musser, Santanu Dutt - Converted to work with Keel
| Method Summary |
void |
clearPassword()
Clears out password state. |
void |
handle(javax.security.auth.callback.Callback[] callbacks)
Handles the specified set of Callbacks. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
username
private java.lang.String username
-
password
char[] password
-
domain
private java.lang.String domain
-
remember
private boolean remember
-
conf
private Configuration conf
-
log
private Logger log
-
serviceManager
private ServiceManager serviceManager
-
LoginCallbackHandler
public LoginCallbackHandler()
-
Default constructor
LoginCallbackHandler
public LoginCallbackHandler(java.lang.String user,
java.lang.String pass,
java.lang.String domain,
boolean remember,
Configuration newConf,
Logger newLog,
ServiceManager newManager)
-
Creates a callback handler with the give username and password.
handle
public void handle(javax.security.auth.callback.Callback[] callbacks)
throws java.io.IOException,
javax.security.auth.callback.UnsupportedCallbackException
-
Handles the specified set of Callbacks. Uses the username and password that were supplied to our constructor to popluate the Callbacks. This class supports NameCallback, PasswordCallback, ConfirmationCallback and TextInputCallback.
-
- Specified by:
handle in interface javax.security.auth.callback.CallbackHandler
-
- Parameters:
callbacks - the callbacks to handle
- Throws:
IOException - if an input or output error occurs.
javax.security.auth.callback.UnsupportedCallbackException - if the callback is not an instance of NameCallback, PasswordCallback, ConfirmationCallback or TextInputCallback.
clearPassword
public void clearPassword()
-
Clears out password state.
-
-
Please see keelframework.org for information about new Keel releases.