ibm-cloud-sdk-core
Version:
Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.
164 lines (74 loc) • 2.12 kB
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) > [JwtTokenManager](./ibm-cloud-sdk-core.jwttokenmanager.md)
## JwtTokenManager class
A class for shared functionality for parsing, storing, and requesting JWT tokens. Intended to be used as a parent to be extended for token request management. Child classes should implement `requestToken()` to retrieve the bearer token from intended sources.
**Signature:**
```typescript
export declare class JwtTokenManager extends TokenManager
```
**Extends:** [TokenManager](./ibm-cloud-sdk-core.tokenmanager.md)
## Constructors
<table><thead><tr><th>
Constructor
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[(constructor)(options)](./ibm-cloud-sdk-core.jwttokenmanager._constructor_.md)
</td><td>
</td><td>
Create a new JwtTokenManager instance.
</td></tr>
</tbody></table>
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[tokenInfo](./ibm-cloud-sdk-core.jwttokenmanager.tokeninfo.md)
</td><td>
`protected`
</td><td>
any
</td><td>
</td></tr>
<tr><td>
[tokenName](./ibm-cloud-sdk-core.jwttokenmanager.tokenname.md)
</td><td>
`protected`
</td><td>
string
</td><td>
</td></tr>
</tbody></table>
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[requestToken()](./ibm-cloud-sdk-core.jwttokenmanager.requesttoken.md)
</td><td>
`protected`
</td><td>
Request a JWT using an API key.
</td></tr>
<tr><td>
[saveTokenInfo(tokenResponse)](./ibm-cloud-sdk-core.jwttokenmanager.savetokeninfo.md)
</td><td>
`protected`
</td><td>
Save the JWT service response and the calculated expiration time to the object's state.
</td></tr>
</tbody></table>