Skip to main content

Authentication

Configuration

On the device, the following files contain credentials for access.

  • config/auth/auth_users.json is a JSON file with a dictionary for username, password pairs
  • config/auth/auth_tokens.json is a JSON file with a list of authentication tokens

Basic Authentication

The API supports Basic Authentication based on the auth_users file, using the Basic Schema.

To implement this, a client should include an "Authorization: Basic" header with the credentials formatted as base64(username:password). For a javascript example, see the frontend's Api.js.

Bearer Tokens

The API also supports Bearer Tokens, based on the auth_tokens file.

To implement this, a client should include an "Authorization: Bearer" token. See Swagger's page for more examples.

WebAuthN

WebAuthN will support passwordless authenication. Support is a work in progress and is currently disabled. The following endpoints will be available.

GET /register/?username=username

POST /register/

GET /login/?username=username

POST /login/