(constructor)
Home > @gooddata/sdk-backend-tiger > TigerJwtAuthProvider > (constructor)
TigerJwtAuthProvider.(constructor)
This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Create a new instance of TigerJwtAuthProvider
Signature:
constructor(jwt: string, notAuthenticatedHandler?: NotAuthenticatedHandler, tokenIsAboutToExpireHandler?: JwtIsAboutToExpireHandler | undefined, secondsBeforeTokenExpirationToCallReminder?: number);
Parameters
Parameter | Type | Description |
---|---|---|
jwt | string | The JSON Web Token value. |
notAuthenticatedHandler | NotAuthenticatedHandler | (Optional) Optional handler called when auth provider encounters "non-authenticated" error (for example when session is no longer valid due to expired JWT). |
tokenIsAboutToExpireHandler | JwtIsAboutToExpireHandler | undefined | (Optional) Optional handler called when JWT is about to expire. The handler will receive function that can be used to set the new JWT to continue the current session. |
secondsBeforeTokenExpirationToCallReminder | number | (Optional) The number of seconds before token expiration to call tokenIsAboutToExpireHandler handler. The handler is called only when the value is positive number greater than zero and tokenIsAboutToExpireHandler handler value is provided. |