Skip to content

Commit

Permalink
add api authentication note
Browse files Browse the repository at this point in the history
  • Loading branch information
BeryJu committed Oct 11, 2024
1 parent cb0cdbf commit 4fdca9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/content/docs/api/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ Gravity's API is also available on the socket `/var/run/gravity.sock` with no au

### Authentication

A default admin user is created on the first startup. You can find the credentials printed to stdout. See [Installation](../install).

Session authentication using local users and OIDC is supported for browser usage. API keys can also be created for automation.

A default admin user is created on the first startup. You can find the credentials printed to stdout. See [Installation](../install).
To authenticate to the API using a token, create the token either using [ADMIN_TOKEN](../install/_index.md#advanced), or in the Web Interface under __Auth -> Tokens__. Upon creation, the token will be shown in the browser. Afterwards, add the `Authorization` header to API requests with the value of `Bearer <token>`.

#### CLI

Expand Down
2 changes: 1 addition & 1 deletion docs/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"

[[redirects]]
from = "/api/event"
to = "https://analytics.beryju.org/api/event"
to = "https://analytics.beryju.io/api/event"
status = 200
force = true

0 comments on commit 4fdca9b

Please sign in to comment.