TdxOAuth2AuthorizationAgent.AccessTokenExpiresIn Property
Returns the account access token expiration time, in seconds.
Declaration
property AccessTokenExpiresIn: Integer read;
Property Value
Type |
---|
Integer |
Remarks
An access token received from an OAuth 2.0 authorization server has a limited lifetime. The authorization agent can use a refresh token to automatically obtain a new access token once the current token expires.
You can use the AccessTokenExpiresIn property to obtain the number of seconds after which a newly received access token expires. In most cases, authorization servers set the expiration time for access tokens they provide. If an authorization server does not set the expiration time for the provided access token, the AccessTokenExpiresIn property value changes to the DefaultTokenExpiresIn writable typed constant.
The AccessTokenExpiresIn property returns 0 if the authorization agent has no valid access token.