org.jboss.security.auth.callback
Class AppCallbackHandler

java.lang.Object
  extended by org.jboss.security.auth.callback.AppCallbackHandler
All Implemented Interfaces:
CallbackHandler

public class AppCallbackHandler
extends Object
implements CallbackHandler

JBAS-3109:AppCallbackHandler as the default CallbackHandler in the security module An implementation of the JAAS CallbackHandler interface that handles NameCallbacks, PasswordCallback, TextInputCallback and the JBoss ByteArrayCallback. All JBoss Callbacks must be handled. - MapCallback

Version:
$Revision: 1.1.2.2 $
Author:
Scott.Stark@jboss.org, Anil.Saldhana@jboss.org
See Also:
CallbackHandler, handle(Callback[])

Constructor Summary
AppCallbackHandler(boolean isConsoleHandler)
          Create a new AppCallbackHandler.
AppCallbackHandler(Map mapOfValues)
          Create a new AppCallbackHandler.
AppCallbackHandler(String prompt)
          Create a new AppCallbackHandler.
AppCallbackHandler(String username, char[] password)
           
AppCallbackHandler(String username, char[] password, byte[] data)
           
AppCallbackHandler(String username, char[] password, byte[] data, String text)
           
 
Method Summary
 void clearCredential()
           
 Object getCredential()
           
 String getPrompt()
           
 void handle(Callback[] callbacks)
           
 void setCredential(Object credential)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppCallbackHandler

public AppCallbackHandler(String username,
                          char[] password)

AppCallbackHandler

public AppCallbackHandler(String username,
                          char[] password,
                          byte[] data)

AppCallbackHandler

public AppCallbackHandler(String username,
                          char[] password,
                          byte[] data,
                          String text)

AppCallbackHandler

public AppCallbackHandler(boolean isConsoleHandler)
Create a new AppCallbackHandler.

Parameters:
isConsoleHandler - Denotes whether the input is from the console.

AppCallbackHandler

public AppCallbackHandler(String prompt)
Create a new AppCallbackHandler.

Parameters:
prompt - Prompt meaningful to the LoginModule

AppCallbackHandler

public AppCallbackHandler(Map mapOfValues)
Create a new AppCallbackHandler.

Parameters:
mapOfValues - Key Value Pair
Method Detail

getPrompt

public String getPrompt()

getCredential

public Object getCredential()

setCredential

public void setCredential(Object credential)

clearCredential

public void clearCredential()

handle

public void handle(Callback[] callbacks)
            throws IOException,
                   UnsupportedCallbackException
Specified by:
handle in interface CallbackHandler
Throws:
IOException
UnsupportedCallbackException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.