ibm-cloud-sdk-core
Version:
Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.
164 lines (74 loc) • 2.42 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) > [IamAuthenticator](./ibm-cloud-sdk-core.iamauthenticator.md)
## IamAuthenticator class
The IamAuthenticator will use the user-supplied `apikey` value to obtain a bearer token from a token server. When the bearer token expires, a new token is obtained from the token server. If specified, the optional, mutually inclusive "clientId" and "clientSecret" pair can be used to influence rate-limiting for requests to the IAM token server.
The bearer token will be sent as an Authorization header in the form:
Authorization: Bearer <<!-- -->bearer-token<!-- -->>
**Signature:**
```typescript
export declare class IamAuthenticator 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.iamauthenticator._constructor_.md)
</td><td>
</td><td>
Create a new IamAuthenticator 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>
[requiredOptions](./ibm-cloud-sdk-core.iamauthenticator.requiredoptions.md)
</td><td>
`protected`
</td><td>
string\[\]
</td><td>
</td></tr>
<tr><td>
[tokenManager](./ibm-cloud-sdk-core.iamauthenticator.tokenmanager.md)
</td><td>
`protected`
</td><td>
[IamTokenManager](./ibm-cloud-sdk-core.iamtokenmanager.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.iamauthenticator.authenticationtype.md)
</td><td>
</td><td>
Returns the authenticator's type ('iam').
</td></tr>
<tr><td>
[getRefreshToken()](./ibm-cloud-sdk-core.iamauthenticator.getrefreshtoken.md)
</td><td>
</td><td>
Return the most recently stored refresh token.
</td></tr>
</tbody></table>