Internet Direct (Indy) Version 9.0.1 Beta
TIdUserManager.OnAfterAuthentication
Event handler signalled after an attempt to authenticate a user account.

property OnAfterAuthentication: TOnAfterAuthentication;
Description
OnAfterAuthentication is a TOnAfterAuthentication property that represents the event handler signalled after an attempt to authenticate a user account. Arguments for the event handler include the user identity (AUserName) and credentials (APassword) used for authenticating the client account.

Applications must assign a procedure to the event handler to allow responding to the event notification. The OnAfterAuthentication event handler can be use to perform authentication where the account identity or credentials are stored outside the server implementation, or where additional logging is required after an attempt to access the server.

The OnAfterAuthentication event handler can change the value in AAuthenticationResult to indicate if the authentication attempt was successful.

OnAfterAuthentication is used in the AuthenticateUser method after the user account identified in AUsername has verified the password in APassword for the user account. AAuthenticationResult contains the result for the account authorization prior to signalling the TOnAfterAuthentication event.