VistALink v1.5.0.026

gov.va.med.vistalink.security
Class CallbackHandlerSwing

java.lang.Object
  extended bygov.va.med.vistalink.security.CallbackHandlerBase
      extended bygov.va.med.vistalink.security.CallbackHandlerSwing
All Implemented Interfaces:
javax.security.auth.callback.CallbackHandler
Direct Known Subclasses:
CallbackHandlerSwingCCOW

public class CallbackHandlerSwing
extends gov.va.med.vistalink.security.CallbackHandlerBase

Implements the JAAS CallbackHandler interface. Use with the VistaLoginModule to invoke a Swing-based interactive logon. Input values (access code, verify code, division selection, and other "user input") is collected via a set of GUI dialogs when this callback handler is used.

  1. Create an instance of CallbackHandlerSwing. No parameters are needed.
  2. Create the JAAS LoginContext instance, passing the instance of the callback handler as one of the parameters.
  3. Invoke the JAAS login context's login method. The callback handler will invoke Swing dialogs to collect user input wherever required for login.
For example:

String cfgName = "RpcSampleServer";

// create the callback handler
CallbackHandlerSwing cbhSwing = new CallbackHandlerSwing(myFrame);

// create the LoginContext
loginContext = new LoginContext(cfgName, cbhSwing);

// login to server
loginContext.login();

Version:
1.5.0.026
Author:
Application Modernization - Foundations Team
See Also:
VistaLoginModule

Constructor Summary
CallbackHandlerSwing(java.awt.Frame windowParent)
          Instantiates a JAAS callback handler for Swing applications.
 
Method Summary
 void handle(javax.security.auth.callback.Callback[])
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallbackHandlerSwing

public CallbackHandlerSwing(java.awt.Frame windowParent)
Instantiates a JAAS callback handler for Swing applications.

Parameters:
windowParent - Allows dialogs launched during login to know about the parent window that launched them. This may be useful in several areas, one of which is accessibility; screen readers can verbally link a dialog to the parent window that launched the dialog. While null could be passed in, it is recommended to pass in the parent frame.
Method Detail

handle

public void handle(javax.security.auth.callback.Callback[])
            throws javax.security.auth.callback.UnsupportedCallbackException
Specified by:
handle in interface javax.security.auth.callback.CallbackHandler
Throws:
javax.security.auth.callback.UnsupportedCallbackException

VistALink v1.5.0.026

VistALink v1.5.0.026