loginFailed(User, String, LoginFailureReason, StringBuffer, SessionData) method
This method is called by the Agentry Server when authentication of a client user fails, either because this class threw PasswordInvalidException from the login or loginPreviousUser methods, or because another system connection reported a login failure.
Syntax
public
void
loginFailed
(
User
user
,
String
userId
,
LoginFailureReason
reason
,
StringBuffer
error
,
SessionData
sessionData
) throws LoginBlockedException
Parameters
-
user –
The User object for the user whose login attempt has failed. This can be null, if the login was failed by another system connection before the createUser and login methods of this system connection were called.
-
userId –
The user name of the user that was logging in. This parameter might be useful if user is null, but you still need to take some sort of action for the user for some reason. If user is not null, then this parameter will be equal to the user name contained in user.
-
reason –
The reason for the login failure.
-
error –
A StringBuffer that contains the error message that was returned by the system connection that failed the login. This message will ultimately be logged on the server and displayed on the client. The error message can be changed by modifying the contents of this buffer.
-
sessionData –
The session data. In addition to its usual contents, this data will contain additional information about which system connection failed the login, if the failure reason was not NoBackEndsAuthenticated. This information will be available as the values for the SDML keys failed.backend.id (the system connection number) and failed.backend.name (the system connection name, as configured in Agentry.ini ).
Exceptions
-
LoginBlockedException class –
if the login failure should be treated as a blocked login instead. This will trigger a subsequent call to loginBlocked in this system connection, as well as the equivalent in other system connections.
Usage
It should clean up any user-related resources.