UNPKG

ibm-cloud-sdk-core

Version:

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

187 lines (84 loc) 2.95 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; [ContainerAuthenticator](./ibm-cloud-sdk-core.containerauthenticator.md) ## ContainerAuthenticator class The ContainerAuthenticator will read a compute resource token from the file system and use this value to obtain a bearer token from the IAM token server. When the bearer token expires, a new token is obtained from the token server. The bearer token will be sent as an Authorization header in the form: Authorization: Bearer &lt;<!-- -->bearer-token<!-- -->&gt; **Signature:** ```typescript export declare class ContainerAuthenticator extends IamRequestBasedAuthenticator ``` **Extends:** [IamRequestBasedAuthenticator](./ibm-cloud-sdk-core.iamrequestbasedauthenticator.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.containerauthenticator._constructor_.md) </td><td> </td><td> Create a new ContainerAuthenticator 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> [tokenManager](./ibm-cloud-sdk-core.containerauthenticator.tokenmanager.md) </td><td> `protected` </td><td> [ContainerTokenManager](./ibm-cloud-sdk-core.containertokenmanager.md) </td><td> </td></tr> </tbody></table> ## Methods <table><thead><tr><th> Method </th><th> Modifiers </th><th> Description </th></tr></thead> <tbody><tr><td> [authenticationType()](./ibm-cloud-sdk-core.containerauthenticator.authenticationtype.md) </td><td> </td><td> Returns the authenticator's type ('container'). </td></tr> <tr><td> [getRefreshToken()](./ibm-cloud-sdk-core.containerauthenticator.getrefreshtoken.md) </td><td> </td><td> Return the most recently stored refresh token. </td></tr> <tr><td> [setCrTokenFilename(crTokenFilename)](./ibm-cloud-sdk-core.containerauthenticator.setcrtokenfilename.md) </td><td> </td><td> Setter for the filename of the compute resource token. </td></tr> <tr><td> [setIamProfileId(iamProfileId)](./ibm-cloud-sdk-core.containerauthenticator.setiamprofileid.md) </td><td> </td><td> Setter for the "profile\_id" parameter to use when fetching the bearer token from the IAM token server. </td></tr> <tr><td> [setIamProfileName(iamProfileName)](./ibm-cloud-sdk-core.containerauthenticator.setiamprofilename.md) </td><td> </td><td> Setter for the "profile\_name" parameter to use when fetching the bearer token from the IAM token server. </td></tr> </tbody></table>