From 4fdca9ba9fd3cf2a162de08692c98196c7f66552 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 11 Oct 2024 22:49:37 +0200 Subject: [PATCH] add api authentication note #1169 --- docs/content/docs/api/_index.md | 4 +++- docs/netlify.toml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/content/docs/api/_index.md b/docs/content/docs/api/_index.md index 622550ef1..15d5cee0f 100644 --- a/docs/content/docs/api/_index.md +++ b/docs/content/docs/api/_index.md @@ -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 `. #### CLI diff --git a/docs/netlify.toml b/docs/netlify.toml index fc6966fef..ace85e5b9 100644 --- a/docs/netlify.toml +++ b/docs/netlify.toml @@ -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