The AuthHttpENEConnection class has a login method to read the password file for authentication.
If the user is not in the password file, the authentication will fail (if the FileLoginModule is marked as required in the Access Control configuration file) and the user will not be allowed access to the Endeca implementation.
// Authenticate the user via a local password file. nec.login(new StaticCallbackHandler(name, password));
The StaticCallbackHandler object provides the user name and password. If the login attempt fails, an ENEAuthenticationException exception is thrown.
Login(IAuthCredentialRequestHandler handler)where handler is an IAuthCredentialRequestHandler object instance that provides the mechanism to obtain credentials for authentication purposes.
//Authenticate the user nec.Login(new StaticCredentialRequestHandler(user, pass));
The StaticCredentialRequestHandler object provides the user name and password. If the login attempt fails, an ENEAuthenticationException exception is thrown.