Internet Direct (Indy) Version 9.0.1 Beta
TIdUserManager.AuthenticateUser
Authenticates user identity and credentials using user accounts.

function AuthenticateUser(const AUsername: String; const APassword: String): Boolean;
Parameters
const AUsername: String
User identity to validate.

const APassword: String
User credentials to validate.

Returns
Boolean - True when authentication was successful.

Description
AuthenticateUser is a Boolean function that authenticates a user account using the values specified in AUsername and APassword. AuthenticateUser retrieves the TIdUserAccount identified by AUsername. If a user account having the specified name cannot be located, AuthenticateUser will return False.

AuthenticateUser calls TIdUSerAccount.CheckPassword for the value specified in APassword to complete the authorization process. After aythentication, the OnAfterAuthentication event handler is signalled to allow verification against an external source or logging for account access attempts.