|
VistALink v1.5.0.026 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.va.med.vistalink.security.CallbackHandlerBase
gov.va.med.vistalink.security.CallbackHandlerSwing
gov.va.med.vistalink.security.CallbackHandlerSwingCCOW
Implements the JAAS CallbackHandler interface. Use with the VistaLoginModule
to invoke a Swing-based
interactive logon, using the CCOW-enabled features of the VistaLink login module. If user authentication is required
(if a valid user context does not exist that can be leveraged for single signon), input values (access code, verify
code, division selection, and other "user input") are collected via a set of Swing GUI dialogs by this callback
handler.
To login:
LoginContext
instance, passing the instance of the callback handler as one of the
parameters.
login
method. The callback handler will invoke Swing dialogs to
collect user input wherever required for login.
try {
// connect to CCOW context
// use HDS classes to create context broker, module
private IClinicalContextBroker ccowContextBroker;
private ContextModule ccowContextModule;
// create new Context Module with HDS library call
ccowContextModule = new ContextModule(CCOW_APPLICATION_NAME, CCOW_APPLICATION_PASSCODE);
// create context participant (a class that implements HDS IContextObserver,
// IContextParticipant interfaces)
sampleAppContextParticipant = new SampleAppContextParticipant();
if (ccowContextModule != null) {
ccowContextBroker = ccowContextModule.getBroker(this, sampleAppContextParticipant);
}
// create the callback handler
CallbackHandlerSwingCCOW cbhSwing = new CallbackHandlerSwingCCOW(this.topFrame, this.ccowContextModule,
this.ccowContextBroker);
// create the LoginContext
loginContext = new LoginContext(jaasConfigName, cbhSwing);
// login to server
loginContext.login();
// get principal
userPrincipal = VistaKernelPrincipalImpl.getKernelPrincipal(loginContext.getSubject());
// set the app's VistaLink 'connected' status to connected.
if ((ccowContextBroker != null) && (ccowContextBroker.isConnected())) {
storeUserContextState();
}
} catch (Exception e) {
JOptionPane.showMessageDialog(topFrame, e.getMessage(), "Login error", JOptionPane.ERROR_MESSAGE);
statusLabel.setText(STATUS_LABEL_DISCONNECTED_TEXT);
gracefulLogout(-1);
}
VistaLoginModule
Field Summary | |
static java.lang.String |
VHA_CCOW_LOGON_DOMAIN
The VistA Domain. |
static java.lang.String |
VHA_CCOW_LOGON_NAME
The user context location under which the user name is stored. |
static java.lang.String |
VHA_CCOW_LOGON_NAME_GENERIC
The non-VA-specific generic user context location under which the user name is stored. |
static java.lang.String |
VHA_CCOW_LOGON_TOKEN
The user context location under which the Kernel token is stored. |
static java.lang.String |
VHA_CCOW_LOGON_VPID
The user context location under which the VPID is stored. |
static java.lang.String[] |
VHA_CCOW_USER_CONTEXT_KEYS
Array containing the complete set of VHA user context keys. |
Constructor Summary | |
CallbackHandlerSwingCCOW(java.awt.Frame windowParent,
gov.va.med.hds.cd.ccow.IContextModule applicationCcowContextModule,
gov.va.med.hds.cd.ccow.IClinicalContextBroker applicationCcowContextBroker)
Creates a callback handler for VistaLink logins, using a SWING interface, and using the CCOW-enabled features of VistaLink to provide a CCOW-enabled login. |
Method Summary | |
static boolean |
hasNonNullUserContext(java.util.Map contextItems)
returns whether the context contains at least one user context item. |
Methods inherited from class gov.va.med.vistalink.security.CallbackHandlerSwing |
handle |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String VHA_CCOW_LOGON_TOKEN
public static final java.lang.String VHA_CCOW_LOGON_NAME
public static final java.lang.String VHA_CCOW_LOGON_NAME_GENERIC
public static final java.lang.String VHA_CCOW_LOGON_VPID
public static final java.lang.String VHA_CCOW_LOGON_DOMAIN
public static final java.lang.String[] VHA_CCOW_USER_CONTEXT_KEYS
Constructor Detail |
public CallbackHandlerSwingCCOW(java.awt.Frame windowParent, gov.va.med.hds.cd.ccow.IContextModule applicationCcowContextModule, gov.va.med.hds.cd.ccow.IClinicalContextBroker applicationCcowContextBroker)
windowParent
- The parent application window, used for centering login dialogs.applicationCcowContextModule
- the application's CCOW context module the login module should use to read the CCOW contextapplicationCcowContextBroker
- the application's CCOW context broker the login module should use to read the CCOW contextMethod Detail |
public static boolean hasNonNullUserContext(java.util.Map contextItems)
contextItems
- Map of context items representing a context
|
VistALink v1.5.0.026 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |