public final class VistaLoginModule extends Object implements LoginModule
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();
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVER_ADDRESS_KEY
JAAS configuration key to store/retrieve server IP address.
|
static String |
SERVER_ADDRESS_KEY_V1
JAAS configuration key to store/retrieve server IP address, in v1.0.
|
static String |
SERVER_PORT_KEY
JAAS configuration key to store/retrieve server port.
|
static String |
SERVER_PORT_KEY_V1
JAAS configuration key to store/retrieve server port, in v1.0.
|
static String |
SERVER_SPI_KEY
JAAS configuration key to store/retrieve the mode for providing back-end Kernel login services.
|
| Constructor and Description |
|---|
VistaLoginModule() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort()
Should never be called by an application directly.
|
boolean |
commit()
Should never be called by an application directly.
|
void |
initialize(Subject subject,
CallbackHandler callbackHandler,
Map sharedState,
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.
|
public static final String SERVER_ADDRESS_KEY
VistaLoginModule.public static final String SERVER_ADDRESS_KEY_V1
public static final String SERVER_PORT_KEY
VistaLoginModule.public static final String SERVER_PORT_KEY_V1
public static final String SERVER_SPI_KEY
VistaLoginModule.public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options)
Part of the JAAS interface for a login module; initializes the login module.
initialize in interface LoginModulesubject - 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.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 LoginModuleVistaLoginModuleException - a VistaLoginModuleException is thrown if the login for this module fails.VistaLoginModuleLoginsDisabledException - thrown if logins are disabledVistaLoginModuleNoJobSlotsAvailableException - thrown if no job slots are availableVistaLoginModuleNoPathToListenerException - thrown if the specified listener can't be reachedVistaLoginModuleTooManyInvalidAttemptsException - thrown if too many bad login attempts are madeVistaLoginModuleUserCancelledException - thrown if user cancels the loginVistaLoginModuleUserTimedOutException - thrown if user times out of the loginpublic boolean commit()
throws 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 LoginModuleLoginException - this is never thrown by this implementation of commit().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 LoginModuleVistaLoginModuleException - thrown if logging out on the M side fails.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 LoginModuleVistaLoginModuleException - thrown if the logout fails on the M side.Copyright © 2026. All rights reserved.