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 Default Description
type * Const[basic] basic
users * List[BasicUserPreset] A list of users with basic credentials to create

Objects

BasicUserPreset

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