org.apache.geronimo.security.jaas.server
Class DecouplingCallbackHandler

java.lang.Object
  extended by org.apache.geronimo.security.jaas.server.DecouplingCallbackHandler
All Implemented Interfaces:
CallbackHandler

public class DecouplingCallbackHandler
extends Object
implements CallbackHandler

This callback handler separates the process of obtaining callbacks from the user from the process of providing the user's values to the login module. This means the JaasLoginService can figure out what callbacks the module wants and prompt the user in advance, and then turn around and pass those values to the login module, instead of actually prompting the user at the mercy of the login module.


Constructor Summary
DecouplingCallbackHandler()
           
 
Method Summary
 Callback[] finalizeCallbackList()
          Indicates that the exploring phase is over.
 void handle(Callback[] callbacks)
           
 void setClientResponse(Callback[] callbacks)
          Within the same VM, the client just populates the callbacks directly into the array held by this object.
 void setExploring()
          While we're exploring, we'll discover new callbacks that the server login module wants.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecouplingCallbackHandler

public DecouplingCallbackHandler()
Method Detail

handle

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

setClientResponse

public void setClientResponse(Callback[] callbacks)
                       throws IllegalArgumentException
Within the same VM, the client just populates the callbacks directly into the array held by this object. However, remote clients will serialize their responses, so they need to be manually set back on this object to take effect.

Parameters:
callbacks - The callbacks populated by the client
Throws:
IllegalArgumentException

setExploring

public void setExploring()
While we're exploring, we'll discover new callbacks that the server login module wants. While not exploring, we'll actually set values for the server callbacks.


finalizeCallbackList

public Callback[] finalizeCallbackList()
Indicates that the exploring phase is over.



Copyright © 2006 Apache Software Foundation. All Rights Reserved.