18 lines
543 B
Bash
18 lines
543 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
OCC="php /var/www/html/occ"
|
|
|
|
# Install or enable user_oidc app
|
|
$OCC app:install user_oidc 2>/dev/null || $OCC app:enable user_oidc
|
|
|
|
# Register Authentik as OIDC provider
|
|
$OCC user_oidc:provider "Authentik" \
|
|
--clientid="${OIDC_CLIENT_ID}" \
|
|
--clientsecret="${OIDC_CLIENT_SECRET}" \
|
|
--discoveryuri="https://sso.lail.cloud/application/o/${OIDC_SLUG}/.well-known/openid-configuration" \
|
|
--mapping-uid="preferred_username" \
|
|
--unique-uid=0 \
|
|
--check-bearer=1
|
|
|
|
echo "OIDC provider Authentik configured."
|