Authentication

Authentication provides shortcuts for common HTTP authentication schemes. It populates the authentication field of a recipe. There are multiple source types, and the type is specified using the type field.

Authentication Types

VariantValue
basicBasic authentication
bearerBearer token

Basic Authentication

Basic authentication contains a username and optional password.

FieldTypeDescriptionDefault
usernamestringUsernameRequired
passwordstringPassword""

Bearer Token

Bearer token authentication takes a single token.

FieldTypeDescriptionDefault
tokenstringTokenRequired

Examples

requests:
  basic_auth:
    method: GET
    url: "{{host}}/fishes"
    authentication:
      type: basic
      username: user
      password: "{{ prompt() }}"

  bearer_auth:
    method: GET
    url: "{{host}}/fishes"
    authentication:
      type: bearer
      token: "{{ file('token.txt') }}"