ibm-cloud-sdk-core
Version:
Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.
20 lines (11 loc) • 884 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [IamRequestBasedTokenManager](./ibm-cloud-sdk-core.iamrequestbasedtokenmanager.md) > [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