From 1f2e8460a730ffc96ad45a68d7cd8e45f67bfd7a Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Mon, 17 May 2021 12:21:16 +0200 Subject: 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. --- opendc-web/opendc-web-api/app.py | 3 +++ 1 file changed, 3 insertions(+) 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) -- cgit v1.2.3