Print Page as PDF
gov.va.med.vistalink.security.CallbackHandlerUnitTest ICR (5223)

gov.va.med.vistalink.security.CallbackHandlerUnitTest    ICR (5223)

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

Implements the JAAS CallbackHandler interface. Use with the VistaLoginModule
to invoke a silent signon. Intended for use in unit testing environments where
logins must be called repetitively without user interaction. Not for use in
production environments, where users should be interactively prompted for
signon credentials.

To use:

1. Pass access code, verify code and division as parameters when you create an
instance of this callback handler.

2. Pass the instance of the callback handler to the login context when you
create the login context.

3. Then, when VistaLoginModule'slogin method (via the indirection of the
LoginContext) invokes this callback handler to collect user input for (access
code, verify code, select division), these values are already present and are
handed back to the login module without any user interation.
STATUS Active
KEYWORDS VistaLink
DURATION Till Otherwise Agreed
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
constructor 3-arg
CallbackHandlerUnitTest(java.lang.String accessCode,
java.lang.String verifyCode, java.lang.String divisionIen): Creates a simple
callback handler that handles the callbacks for logon.
VARIABLES TYPE VARIABLES DESCRIPTION
accessCode Input
java.lang.String accessCode: Access Code to use for
logon.
verifyCode Input
java.lang.String verifyCode: Verify Code to use for
logon.
divisionIen Input
java.lang.String divisionIen: IEN of division to
select for multidivisional logins. If not needed, pass an empty string.
constructor 5-arg
CallbackHandlerUnitTest(java.lang.String accessCode,
java.lang.String oldVerifyCode, java.lang.String divisionIen, java.lang.String
newVerifyCode, java.lang.String newVerifyCodeCheck):

Creates a simple callback handler that handles the callbacks for logon.  Will
change verify code as part of login.
VARIABLES TYPE VARIABLES DESCRIPTION
accessCode Input
java.lang.String accessCode: Access Code to use for
logon.
oldVerifyCode Input
java.lang.String oldVerifyCode: Verify Code to use
for logon.
divisionIen Input
java.lang.String divisionIen: IEN of division to
select for multidivisional logins. If not needed, pass an empty string.
newVerifyCode Input
java.lang.String newVerifyCode: new verify code to
change.
newVerifyCodeCheck Input
java.lang.String newVerifyCodeCheck: should be the
same as newVerifyCode, to be successful. Used as a check.
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
throws Output
Throws:
javax.security.auth.callback.UnsupportedCallbackException
callbacks Input
javax.security.auth.callback.Callback[] array as
defined in the javax.security.auth.callback.CallbackHandler interface.
DATE ACTIVATED 2008/07/11