login(User, String, SessionData) method

This method authenticates a client user against the Java System Connection.

Syntax

public void login ( User user , String password , SessionData sessionData ) throws LoginException

Parameters

Exceptions

Usage

This method is called when a user initially connects to the Agentry Server from a client application and the enableAuthentication option is set to true in the Java section of the Agentry.ini file. Override this method to implement logic to perform full validation of the user against a remote system.

This method should return normally if the authentication of the user succeeds. If login fails for any reason, the appropriate LoginException subclass should be thrown. An exception should also be thrown for other conditions such as expired or soon-to-be-expiring passwords. By default, this method throws LoginSkippedException, which means that this system connection is not responsible for authenticating the user (it is equivalent to setting enableAuthentication to false in Agentry.ini, except that it can be thrown on a per-user basis).

If you throw PasswordInvalidException or LoginBlockedException, then either loginFailed or loginBlocked, respectively, will be called. From those methods you can return a more detailed error message indicating why the login failed.