Keel 2.1RC2

org.keel.services.authentication
Class LoginCallbackHandler

java.lang.Object
  extended byorg.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

Field Summary
private  Configuration conf
           
private  java.lang.String domain
           
private  Logger log
           
(package private)  char[] password
           
private  boolean remember
           
private  ServiceManager serviceManager
           
private  java.lang.String username
           
 
Constructor Summary
LoginCallbackHandler()
          Default constructor
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.
 
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
 

Field Detail

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
Constructor Detail

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.

Method Detail

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.


Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.