Print Page as PDF
gov.va.med.vistalink.security.CallbackHandlerSwingCCOW ICR (5222)

gov.va.med.vistalink.security.CallbackHandlerSwingCCOW    ICR (5222)

Name Value
NUMBER 5222
IA # 5222
DATE CREATED 2008/07/01
CUSTODIAL PACKAGE VISTALINK SECURITY
USAGE Supported
TYPE Other
DBIC APPROVAL STATUS APPROVED
NAME gov.va.med.vistalink.security.CallbackHandlerSwingCCOW
GENERAL DESCRIPTION
public class CallbackHandlerSwingCCOW extends
gov.va.med.vistalink.security.CallbackHandlerSwing implements
javax.security.auth.callback.CallbackHandler.

Implements the CallbackHandler 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:

1. Create a CCOW context module and broker. Must be securely bound to the
context with a secure application passcode. 2. Create an instance of
CallbackHandlerSwing, passing the Frame window parent, the context module and
broker. 3. Create the JAAS LoginContext instance, passing the instance of the
callback handler as one of the parameters. 4. Invoke the JAAS login context's
login method. The callback handler will invoke Swing dialogs to collect user
input wherever required for login.
STATUS Active
KEYWORDS vistalink
DURATION Till Otherwise Agreed
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
constructor
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.
VARIABLES TYPE VARIABLES DESCRIPTION
windowParent Input
java.awt.Frame windowParent: Allows login dialogs to
be centered over a parent frame (a top-level window with a title and border)
and associated with the parent application for display purposes. If null is
passed, login dialogs are centered based on the screen itself.
appCcowContextModule Input
gov.va.med.hds.cd.ccow.IContextModule
applicationCcowContextModule appCcowContextModule: NOT USED, pass null for
now. PREVIOUSLY WAS: the application's CCOW context module the login module
should use to read the CCOW context. Second parameter in method signature.
appCcowContextBroker Input
gov.va.med.hds.cd.ccow.IClinicalContextBroker
appCcowContextBroker: the application's CCOW context broker the login module
should use to read the CCOW context.
hasNonNullUserContext
public static boolean
hasNonNullUserContext(java.util.Map contextItems):

Returns whether the context contains at least one user context item.
VARIABLES TYPE VARIABLES DESCRIPTION
contextItems Input
java.util.Map contextItems - Map of context items
representing a context.
return Output
boolean return value: true if the context has at
least one non-null user context key/value pair.
handle
public void
handle(javax.security.auth.callback.Callback[] arg0) throws
javax.security.auth.callback.UnsupportedCallbackException:

Implementation of handle() method required in JAAS CallbackHandler interface,
used by JAAS to perform callbacks to retrieve or display information.
VARIABLES TYPE VARIABLES DESCRIPTION
callbacks Input
javax.security.auth.callback.Callback[] array as
defined in the avax.security.auth.callback.CallbackHandler interface.
throws Output
Throws:
javax.security.auth.callback.UnsupportedCallbackException
VHA_CCOW_LOGON_DOMAIN
public static java.lang.String: CCOW user context key
holding the VistA domain name.
VHA_CCOW_LOGON_NAME
public static java.lang.String: CCOW user context key
under which the user name is stored.
VHA_CCOW_LOGON_NAME_GENERIC
public static java.lang.String: The non-VA-specific
generic CCOW user context key under which the user name is stored.
VHA_CCOW_LOGON_TOKEN
public static java.lang.String: The CCOW user context
key under which the Kernel token is stored.
VHA_CCOW_LOGON_VPID
public static java.lang.String: The CCOW user context
key under which the VPID is stored.
VHA_CCOW_USER_CONTEXT_KEYS
public static java.lang.String[]: Array containing
the complete set of VHA CCOW user context keys.
DATE ACTIVATED: JUL 11, 2008