|
VistALink v1.6 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.va.med.vistalink.security.VistaLoginModule
public final class VistaLoginModule
A JAAS-compliant LoginModule to log users on to a Vista system. An application never needs to access the
VistaLoginModule class directly. Rather, as a JAAS login module, its methods are invoked indirectly by an application
through the JAAS login context class (javax.security.auth.login.LoginContext
).
The key classes for invoking a login with this login module are:
CallbackHandlerSwing
, CallbackHandlerSwingCCOW
or
CallbackHandlerUnitTest
javax.security.auth.login.LoginContext
)
VistaKernelPrincipalImpl
)
// create the callback handler
// create the LoginContext
// login to server
String jaasCfgName = "RpcSampleServer";
CallbackHandlerSwing cbhSwing = new CallbackHandlerSwing(myFrame);
loginContext = new LoginContext(jaasCfgName, cbhSwing);
loginContext.login();
An example logout:
// logout of the server
loginContext.logout();
CallbackHandlerSwing
,
CallbackHandlerUnitTest
,
VistaKernelPrincipal
,
VistaKernelPrincipalImpl
Field Summary | |
---|---|
static java.lang.String |
SERVER_ADDRESS_KEY
JAAS configuration key to store/retrieve server IP address. |
static java.lang.String |
SERVER_ADDRESS_KEY_V1
JAAS configuration key to store/retrieve server IP address, in v1.0. |
static java.lang.String |
SERVER_PORT_KEY
JAAS configuration key to store/retrieve server port. |
static java.lang.String |
SERVER_PORT_KEY_V1
JAAS configuration key to store/retrieve server port, in v1.0. |
static java.lang.String |
SERVER_SPI_KEY
JAAS configuration key to store/retrieve the mode for providing back-end Kernel login services. |
Constructor Summary | |
---|---|
VistaLoginModule()
|
Method Summary | |
---|---|
boolean |
abort()
Should never be called by an application directly. |
boolean |
commit()
Should never be called by an application directly. |
void |
initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.util.Map sharedState,
java.util.Map options)
Should never be called by an application directly. |
boolean |
login()
Should never be called by an application directly. |
boolean |
logout()
Should never be called by an application directly. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SERVER_ADDRESS_KEY
VistaLoginModule
.
public static final java.lang.String SERVER_ADDRESS_KEY_V1
public static final java.lang.String SERVER_PORT_KEY
VistaLoginModule
.
public static final java.lang.String SERVER_PORT_KEY_V1
public static final java.lang.String SERVER_SPI_KEY
VistaLoginModule
.
Constructor Detail |
---|
public VistaLoginModule()
This constructor, method or field is not for public use. |
Method Detail |
---|
public void initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map sharedState, java.util.Map options)
Part of the JAAS interface for a login module; initializes the login module.
initialize
in interface javax.security.auth.spi.LoginModule
subject
- the subject to be authenticated.callbackHandler
- a callback handler for communicating with the end user. The VistaLoginModule login module does not
make use of this.sharedState
- state shared with other configuration login modules. Not used by the VistaLoginModule login module.options
- This is where the configuration options passed to the LoginContext are then passed to the LoginModule.This constructor, method or field is not for public use. |
public boolean login() throws VistaLoginModuleException, VistaLoginModuleLoginsDisabledException, VistaLoginModuleNoJobSlotsAvailableException, VistaLoginModuleNoPathToListenerException, VistaLoginModuleTooManyInvalidAttemptsException, VistaLoginModuleUserCancelledException, VistaLoginModuleUserTimedOutException
When an application invokes login() on the LoginContext, the LoginContext calls this method to initiate a login to a VistaLink M server. Once a successful login has occurred, the authenticated connection will be stored in the JAAS subject, in a VistaKernelPrincipal.
login
in interface javax.security.auth.spi.LoginModule
VistaLoginModuleException
- a VistaLoginModuleException is thrown if the login for this module fails.
VistaLoginModuleLoginsDisabledException
- thrown if logins are disabled
VistaLoginModuleNoJobSlotsAvailableException
- thrown if no job slots are available
VistaLoginModuleNoPathToListenerException
- thrown if the specified listener can't be reached
VistaLoginModuleTooManyInvalidAttemptsException
- thrown if too many bad login attempts are made
VistaLoginModuleUserCancelledException
- thrown if user cancels the login
VistaLoginModuleUserTimedOutException
- thrown if user times out of the loginThis constructor, method or field is not for public use. |
public boolean commit() throws javax.security.auth.login.LoginException
Part of the JAAS interface for a login module. Since we don't have a two-phase login, this always returns true (and is irrelevant to the success or failure of a login).
commit
in interface javax.security.auth.spi.LoginModule
javax.security.auth.login.LoginException
- this is never thrown by this implementation of commit().This constructor, method or field is not for public use. |
public boolean abort() throws VistaLoginModuleException
Part of the JAAS interface for a login module. This loginmodule's implementation of this method calls M to cleanly shut down the connection to M. If we were to support an environment with multiple login modules, and the login for one of them failed, this method would be called to do any cleanup to back out of a partial login, which in the case of VistaLink, means clean up/tear down the existing connection to M.
abort
in interface javax.security.auth.spi.LoginModule
VistaLoginModuleException
- thrown if logging out on the M side fails.This constructor, method or field is not for public use. |
public boolean logout() throws VistaLoginModuleException
For applications to call, to logout a user from an open connection/session to a VistaLink M server. Doing this drops the connection, freeing up resources on the M server.
logout
in interface javax.security.auth.spi.LoginModule
VistaLoginModuleException
- thrown if the logout fails on the M side.This constructor, method or field is not for public use. |
|
VistALink v1.6 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |