# HTTPBasicInternetAccount

Auto-generated from the config schema in the source — see the [config guide](https://jbrowse.org/jb2/docs/config_guide) for concepts. Provided by the `authentication` plugin. [View source](https://github.com/GMOD/jbrowse-components/blob/main/plugins/authentication/src/HTTPBasicModel/configSchema.ts).

## Example usage

An entry in the config's `internetAccounts`. JBrowse prompts for the username
and password the first time a file under one of `domains` is opened, and
sends them as an `Authorization: Basic …` header from then on.

```js
{
  type: 'HTTPBasicInternetAccount',
  internetAccountId: 'myLabServer',
  name: 'My lab server',
  description: 'Sequencing data behind the lab htaccess',
  domains: ['data.mylab.org'],
}
```

Prompts for a username and password, and sends them in an HTTP Basic
`Authorization` header on requests to a matching domain.

## Related links

- **State model:** [runtime API](../../models/httpbasicinternetaccount)
- **Base config:** [BaseInternetAccount](../baseinternetaccount)

## Config slots

These slots are top-level fields of the account's entry in `internetAccounts`. Slot types (`fileLocation`, `frozen`, ...) are explained in the [config slot types reference](https://jbrowse.org/jb2/docs/config_guides/slot_types). Slots a base configuration contributes are listed here too, so this table is the whole surface.

| Slot | Description |
| --- | --- |
| **tokenType**<br>[`string`](https://jbrowse.org/jb2/docs/config_guides/slot_types#string) = <code>'Basic'</code> | a custom name for a token to include in the header |
| **validateWithHEAD**<br>[`boolean`](https://jbrowse.org/jb2/docs/config_guides/slot_types#boolean) = <code>true</code> | validate the token with a HEAD request before using it |
| <span class="slot-group">Inherited from [BaseInternetAccount](../baseinternetaccount) | <span class="slot-group-count">4 slots |
| **name**<br>[`string`](https://jbrowse.org/jb2/docs/config_guides/slot_types#string) = <code>''</code> | descriptive name of the internet account |
| **description**<br>[`string`](https://jbrowse.org/jb2/docs/config_guides/slot_types#string) = <code>''</code> | a description of the internet account |
| **authHeader**<br>[`string`](https://jbrowse.org/jb2/docs/config_guides/slot_types#string) = <code>'Authorization'</code> | request header for credentials |
| **domains**<br>[`stringArray`](https://jbrowse.org/jb2/docs/config_guides/slot_types#stringarray) = <code>[]</code> | array of valid domains the url can contain to use this account |

