summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-api/app.py
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-07-02 13:26:09 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-07-02 13:26:09 +0200
commite2ec16a1a40f3ffc437378b4e22fda64f86fe284 (patch)
tree7cee0d138f884aa60435b0587704590ae56af451 /opendc-web/opendc-web-api/app.py
parentd4fec022c5e5ad38e7b5a488cb28e320ea1d6416 (diff)
api: Pass audience during Swagger UI authentication
This change updates the Swagger UI configuration to pass the Auth0 audience to the authorization URL in order to obtain a valid JWT token.
Diffstat (limited to 'opendc-web/opendc-web-api/app.py')
-rwxr-xr-xopendc-web/opendc-web-api/app.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/opendc-web/opendc-web-api/app.py b/opendc-web/opendc-web-api/app.py
index 5916046b..96a1ca7a 100755
--- a/opendc-web/opendc-web-api/app.py
+++ b/opendc-web/opendc-web-api/app.py
@@ -89,6 +89,7 @@ def setup_swagger(app):
},
oauth_config={
'clientId': os.environ.get("AUTH0_DOCS_CLIENT_ID", ""),
+ 'additionalQueryStringParams': {'audience': os.environ.get("AUTH0_AUDIENCE", "https://api.opendc.org/v2/")},
}
)
app.register_blueprint(swaggerui_blueprint)