Skip to content

Basic Authentication with Escape

Description

The 'Basic' authentication preset is designed for straightforward authentication scenarios:

  • Credentials Encoding: User's credentials (username and password) are encoded in base64.
  • Header Attachment: The encoded credentials are attached to the request headers.
  • Authorization Header: The client sends these credentials in the Authorization header of the HTTP request.

This method provides a simple and direct way to authenticate users, without requiring additional server requests for user creation or authentication. It is best suited for scenarios where simplicity and ease of implementation are prioritized.

Note: While this method is straightforward, it's less secure compared to more advanced authentication methods.

Examples

presets:
-   type: basic
    users:
    -   username: user1
        password: pass1
    -   username: user2
        password: pass2

Extensive Configuration

Property Type Required Description
type Const[basic] True
users BasicUserPreset True A list of users with basic credentials to create

Objects

BasicUserPreset

Property Type Required Description
username string True The Basic username of the user.
headers Dict[string, string] False Optional headers injected during the authentication process and in authentified requests.
cookies Dict[string, string] False Optional cookies injected during the authentication process and in authentified requests.
password string True The Basic password of the user.