ibm-cloud-sdk-core
Version:
Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.
56 lines (27 loc) • 1.08 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) > [BasicAuthenticator](./ibm-cloud-sdk-core.basicauthenticator.md) > [authenticate](./ibm-cloud-sdk-core.basicauthenticator.authenticate.md)
## BasicAuthenticator.authenticate() method
Add basic authentication information to `requestOptions`<!-- -->. The basic authentication information will be set in the Authorization property of `requestOptions.headers` in the form:
Authorization: Basic <<!-- -->encoded username and password<!-- -->>
**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>