Official Content

Configures how many refresh_tokens the Identity Provider (IDP) will give to the client application.

Syntax

&GAMSecurityPolicy.OauthTokenMaximumRenovations = Number

Where:

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

Number
  Number of refresh_tokens the Identity Provider (IDP) will give to the client application.

Description

This property allows you to set how many refresh_tokens the Identity Provider (IDP) will give to the client application. That is, the number of times that the access_token can expire, and the login will be automatically renewed without asking the user to enter their credentials again.

In other words, the client application can obtain a refresh_token when requesting an access_token. When the last access_token expires, the refresh token can be used to request a new access_token. 

The default value for the property is 0, which means that the IDP will not give any refresh_token to the client application. When the time indicated in the OauthTokenExpire property reaches 0, the user must log in again.

The maximum number of refresh_tokens the IDP can return is 999.

If you set this property with a value higher than zero, when the client application requests an access_token, the response will look as follows:

{
    "access_token": "85a3006c-0606-41d2-980e-223f88463ec2!b1b3e778247c870560d49d17ffd514a2a8467747208b1cf4a641780a267466bc65fba8034c9bbc",
    "token_type": "Bearer",
    "expires_in": 180,
    "refresh_token": "002b9ec850f78b845d883779fa52c91a01",
    "scope": "gam_user_data",
    "user_guid": "139f4332-3f40-47b0-8fb4-ee7b3dbddc4f"
}

Note: When using the GAM Backoffice, this property is shown with the description "Token maximum renovations".

Sample

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

&GAMSecurityPolicy.OauthTokenExpire  = 180 //minutes
&GAMSecurityPolicy.OauthTokenMaximumRenovations  = 3

See Also

OauthTokenExpire property in GAMSecurityPolicy EO
 

   

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