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: 86122 $
Author:
Scott.Stark@jboss.org, Anil.Saldhana@jboss.org
See Also:
CallbackHandler, handle(Callback[])

Constructor Summary
AppCallbackHandler()
           
AppCallbackHandler(boolean isConsoleHandler)
          Create a new AppCallbackHandler.
AppCallbackHandler(Map<String,Object> 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)
           
 void setSecurityInfo(Principal p, Object cred)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppCallbackHandler

public AppCallbackHandler()

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<String,Object> mapOfValues)
Create a new AppCallbackHandler.

Parameters:
mapOfValues - Key Value Pair
Method Detail

setSecurityInfo

public void setSecurityInfo(Principal p,
                            Object cred)

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 © 2009 JBoss Inc.. All Rights Reserved.