ibm-cloud-sdk-core
Version:
Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.
56 lines (27 loc) • 1.06 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) > [BearerTokenAuthenticator](./ibm-cloud-sdk-core.bearertokenauthenticator.md) > [authenticate](./ibm-cloud-sdk-core.bearertokenauthenticator.authenticate.md)
## BearerTokenAuthenticator.authenticate() method
Add a bearer token to `requestOptions`<!-- -->. The bearer token information will be set in the Authorization property of "requestOptions.headers" in the form:
Authorization: Bearer <<!-- -->bearer-token<!-- -->>
**Signature:**
```typescript
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
requestOptions
</td><td>
AuthenticateOptions
</td><td>
The request to augment with authentication information.
</td></tr>
</tbody></table>
**Returns:**
Promise<void>