---
title: "httpBasicAuthHeader"
canonical: "https://support.appfire.com/space/PSJC/434602768/httpBasicAuthHeader"
format: markdown
---
> Macro (aura-html)


## Description

> Macro (excerpt)
> 
> Creates an HttpHeader object to be used as Authorization header for a Basic authentication of a user.

Creates an HttpHeader object to be used as Authorization header for a Basic authentication of a user.

|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | httpBasicAuthHeader(username, password) | **Package** | http |
| **Alias** |  | **Pkg Usage** | basicAuth(username, password) |

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| username | String | Yes | The username. |
| password | String | Yes | The password. |

## Return Type

**[HttpHeader](https://appfire.atlassian.net/wiki/spaces/PSJC/pages/435028065)**

## Example

```javascript
HttpHeader authHeader = httpBasicAuthHeader("admin", "admin");
```

## See also

> Macro (contentbylabel)