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

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

## 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.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | username | String | Yes | The username. |
> | password | String | Yes | The password. |

## Return Type

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

## Example

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

## See also

> Macro (contentbylabel)