UNPKG

ibm-cloud-sdk-core

Version:

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

157 lines (71 loc) 2.75 kB
<!-- 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; [ContainerTokenManager](./ibm-cloud-sdk-core.containertokenmanager.md) ## ContainerTokenManager class The ContainerTokenManager retrieves a compute resource token from a file on the container. This token is used to perform the necessary interactions with the IAM token service to obtain and store a suitable bearer (access) token. **Signature:** ```typescript export declare class ContainerTokenManager extends IamRequestBasedTokenManager ``` **Extends:** [IamRequestBasedTokenManager](./ibm-cloud-sdk-core.iamrequestbasedtokenmanager.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.containertokenmanager._constructor_.md) </td><td> </td><td> Create a new ContainerTokenManager instance. </td></tr> </tbody></table> ## Methods <table><thead><tr><th> Method </th><th> Modifiers </th><th> Description </th></tr></thead> <tbody><tr><td> [getCrToken()](./ibm-cloud-sdk-core.containertokenmanager.getcrtoken.md) </td><td> `protected` </td><td> Retrieves the CR token from a file using this search order: 1. User-specified filename (if specified) 2. Default file \#1 (/var/run/secrets/tokens/vault-token) 3. Default file \#2 (/var/run/secrets/tokens/sa-token) First one found wins. </td></tr> <tr><td> [getRefreshToken()](./ibm-cloud-sdk-core.containertokenmanager.getrefreshtoken.md) </td><td> </td><td> Returns the most recently stored refresh token. </td></tr> <tr><td> [requestToken()](./ibm-cloud-sdk-core.containertokenmanager.requesttoken.md) </td><td> `protected` </td><td> Request an IAM token using a compute resource token. </td></tr> <tr><td> [setCrTokenFilename(crTokenFilename)](./ibm-cloud-sdk-core.containertokenmanager.setcrtokenfilename.md) </td><td> </td><td> Sets the "crTokenFilename" field </td></tr> <tr><td> [setIamProfileId(iamProfileId)](./ibm-cloud-sdk-core.containertokenmanager.setiamprofileid.md) </td><td> </td><td> Sets the ID of the IAM trusted profile to use when obtaining an access token from the IAM token server. </td></tr> <tr><td> [setIamProfileName(iamProfileName)](./ibm-cloud-sdk-core.containertokenmanager.setiamprofilename.md) </td><td> </td><td> Sets the name of the IAM trusted profile to use when obtaining an access token from the IAM token server. </td></tr> </tbody></table>