diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-17 12:21:16 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-18 15:46:43 +0200 |
| commit | 1f2e8460a730ffc96ad45a68d7cd8e45f67bfd7a (patch) | |
| tree | 2e248117e8efa64dd371faf52e834e85b784bc4f /opendc-web/opendc-web-api/app.py | |
| parent | 53623fad76274e39206b8e073e371775ea96946b (diff) | |
api: Add support for pre-specified Swagger OAuth2 client id
This change adds support for specifying the OAuth2 client identifier
for Swagger API docs authentication. This allows users to experiment
with the API documentation without needing to create an Auth0 account
themselves.
Diffstat (limited to 'opendc-web/opendc-web-api/app.py')
| -rwxr-xr-x | opendc-web/opendc-web-api/app.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/opendc-web/opendc-web-api/app.py b/opendc-web/opendc-web-api/app.py index c05e56b5..5916046b 100755 --- a/opendc-web/opendc-web-api/app.py +++ b/opendc-web/opendc-web-api/app.py @@ -86,6 +86,9 @@ def setup_swagger(app): API_URL, config={ 'app_name': "OpenDC API v2" + }, + oauth_config={ + 'clientId': os.environ.get("AUTH0_DOCS_CLIENT_ID", ""), } ) app.register_blueprint(swaggerui_blueprint) |
