<!-- 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; [BasicAuthenticator](./ibm-cloud-sdk-core.basicauthenticator.md)

## BasicAuthenticator class

The BasicAuthenticator is used to add basic authentication information to requests.

Basic Authorization will be sent as an Authorization header in the form:

Authorization: Basic &lt;<!-- -->encoded username and password<!-- -->&gt;

**Signature:**

```typescript
export declare class BasicAuthenticator extends Authenticator 
```
**Extends:** [Authenticator](./ibm-cloud-sdk-core.authenticator.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.basicauthenticator._constructor_.md)


</td><td>


</td><td>

Create a new BasicAuthenticator 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>

[authHeader](./ibm-cloud-sdk-core.basicauthenticator.authheader.md)


</td><td>

`protected`


</td><td>

{ Authorization: string; }


</td><td>


</td></tr>
<tr><td>

[requiredOptions](./ibm-cloud-sdk-core.basicauthenticator.requiredoptions.md)


</td><td>

`protected`


</td><td>

string\[\]


</td><td>


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[authenticate(requestOptions)](./ibm-cloud-sdk-core.basicauthenticator.authenticate.md)


</td><td>


</td><td>

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 &lt;<!-- -->encoded username and password<!-- -->&gt;


</td></tr>
<tr><td>

[authenticationType()](./ibm-cloud-sdk-core.basicauthenticator.authenticationtype.md)


</td><td>


</td><td>

Returns the authenticator's type ('basic').


</td></tr>
</tbody></table>
