Skip to content

Commit

Permalink
feat: allow adding scopes to the backend info
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Aug 25, 2023
1 parent 9ef824a commit 48a949f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spog/ui/config/nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ if [[ -n "$CLIENT_ID" ]]; then
mv /endpoints/backend.json.tmp /endpoints/backend.json
fi

if [[ -n "$SCOPES" ]]; then
jq --arg scopes "$SCOPES" '. * {oidc: {scopes: $scopes}}' < /endpoints/backend.json | tee /endpoints/backend.json.tmp
mv /endpoints/backend.json.tmp /endpoints/backend.json
fi

echo "Final backend information:"
echo "---"
cat /endpoints/backend.json
Expand Down

0 comments on commit 48a949f

Please sign in to comment.