gov.va.med.vistalink.security
Class CallbackHandlerSwing
java.lang.Object
gov.va.med.vistalink.security.CallbackHandlerSwing
- All Implemented Interfaces:
- javax.security.auth.callback.CallbackHandler
- Direct Known Subclasses:
- CallbackHandlerSwingCCOW
public class CallbackHandlerSwing
- extends java.lang.Object
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();
- 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[] arg0)
|
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 login dialogs to be centered over a parent frame (a top-level window with a title and border).
If null is passed, login dialogs are centered based on the screen itself.
handle
public void handle(javax.security.auth.callback.Callback[] arg0)
throws javax.security.auth.callback.UnsupportedCallbackException
- Specified by:
handle
in interface javax.security.auth.callback.CallbackHandler
- Throws:
javax.security.auth.callback.UnsupportedCallbackException
VistALink v1.6