gov.va.med.vistalink.security
Class CallbackHandlerSwing
java.lang.Object
gov.va.med.vistalink.security.CallbackHandlerBase
gov.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.
- Create an instance of CallbackHandlerSwing. No parameters are needed.
- Create the JAAS
LoginContext
instance, passing the instance of the callback handler as one of the
parameters.
- 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 |
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.
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