Make minValidity parameter in updateToken() optional (#23050)

Closes #23149
This commit is contained in:
Daniil Dubrava 2023-09-14 12:13:51 +02:00 committed by GitHub
parent 1bacd2e23a
commit 911ff1af87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -578,6 +578,7 @@ declare class Keycloak {
* If the token expires within `minValidity` seconds, the token is refreshed. * If the token expires within `minValidity` seconds, the token is refreshed.
* If the session status iframe is enabled, the session status is also * If the session status iframe is enabled, the session status is also
* checked. * checked.
* @param minValidity If not specified, `5` is used.
* @returns A promise to set functions that can be invoked if the token is * @returns A promise to set functions that can be invoked if the token is
* still valid, or if the token is no longer valid. * still valid, or if the token is no longer valid.
* @example * @example
@ -592,7 +593,7 @@ declare class Keycloak {
* alert('Failed to refresh the token, or the session has expired'); * alert('Failed to refresh the token, or the session has expired');
* }); * });
*/ */
updateToken(minValidity: number): Promise<boolean>; updateToken(minValidity?: number): Promise<boolean>;
/** /**
* Clears authentication state, including tokens. This can be useful if * Clears authentication state, including tokens. This can be useful if