Official Content

Configures the number of login failures until the user is locked. Its default value is 0, which means that regardless of the number of login attempts, the user will never be blocked.

Syntax

&GAMRepository.LoginAttemptsToLockUser = Number

Where:

&GAMRepository
 
 Is a variable based on the GAMRepository data type.

Number
  Number of login failures until the user is locked.

Description

This property allows you to set the number of login failures until the user is locked.

Its default value is 0, which means that regardless of the number of login attempts, the user will never be blocked.

This property is also taken into account for login attempts through the oauth/access_token and oauth/gam/v2.0/access_token services.

Note: When using the GAM Backoffice, this property can be configured by selecting Repository > Configuration > General Security Policy. It is shown with the description "Login retries to lock user".

Sample

To set this property in the GeneXus code (by using the GAM API), the syntax is as follows:

&GAMRepository.LoginAttemptsToLockUser = 2

For example, if the user makes more than 2 unsuccessful attempts using the oauth/access_token service, the following message will be displayed:

{
    "error": {
        "code": "10",
        "message": "User blocked. Please contact the application administrator."
    }
}

When blocked, the user needs to be unblocked by the GAM Backoffice Administrator. 

See GAMUnblockUserTimeout property in GAMRepository EO as another way to unblock user sessions.

See Also

LoginAttemptsToLockSession property in GAMRepository EO
GAMUnblockUserTimeout property in GAMRepository EO
GAM Repository features and properties

Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant