ibm-cloud-sdk-core
Version:
Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.
20 lines (11 loc) • 929 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) > [TokenManager](./ibm-cloud-sdk-core.tokenmanager.md) > [pacedRequestToken](./ibm-cloud-sdk-core.tokenmanager.pacedrequesttoken.md)
## TokenManager.pacedRequestToken() method
Paces requests to requestToken().
This method pseudo-serializes requests for an access\_token when the current token is undefined or expired. The first caller to this method records its `requestTime` and then issues the token request. Subsequent callers will check the `requestTime` to see if a request is active (has been issued within the past 60 seconds), and if so will queue their promise for the active requestor to resolve when that request completes.
**Signature:**
```typescript
protected pacedRequestToken(): Promise<any>;
```
**Returns:**
Promise<any>