Fix Authentik WIF client credentials
This commit is contained in:
parent
8180c3c35a
commit
e7c0442a12
6 changed files with 107 additions and 35 deletions
|
|
@ -115,12 +115,13 @@ else
|
|||
fi
|
||||
token_endpoint="$(resolve_token_endpoint)"
|
||||
curl -fsS \
|
||||
-u "${authentik_client_id}:${authentik_client_secret}" \
|
||||
-d grant_type=client_credentials \
|
||||
-d client_id="$authentik_client_id" \
|
||||
-d client_secret="$authentik_client_secret" \
|
||||
-d scope="openid profile email groups" \
|
||||
-d audience="$authentik_audience" \
|
||||
"$token_endpoint" \
|
||||
| jq -r '.id_token // empty' > "$token_path"
|
||||
| jq -r '.id_token // .access_token // empty' > "$token_path"
|
||||
fi
|
||||
|
||||
chmod 0600 "$token_path"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue