UNPKG

ibm-cloud-sdk-core

Version:

Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.

20 lines (11 loc) 884 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) &gt; [IamRequestBasedTokenManager](./ibm-cloud-sdk-core.iamrequestbasedtokenmanager.md) &gt; [isTokenExpired](./ibm-cloud-sdk-core.iamrequestbasedtokenmanager.istokenexpired.md) ## IamRequestBasedTokenManager.isTokenExpired() method Returns true iff the currently-cached IAM access token is expired. We'll consider an access token as expired when we reach its IAM server-reported expiration time minus our expiration window (10 secs). We do this to avoid using an access token that might expire in the middle of a long-running transaction within an IBM Cloud service. **Signature:** ```typescript protected isTokenExpired(): boolean; ``` **Returns:** boolean true if the token has expired, false otherwise