From a8ef667642e1bbc06089eb358c763f7026556512 Mon Sep 17 00:00:00 2001 From: Monty Dawson <wgd23@cam.ac.uk> Date: Mon, 14 Mar 2022 13:59:03 +0000 Subject: [PATCH] Get scopes and scope description from settings rather than specific module --- apigatewayauth/openapi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apigatewayauth/openapi.py b/apigatewayauth/openapi.py index eceedde..2f46077 100644 --- a/apigatewayauth/openapi.py +++ b/apigatewayauth/openapi.py @@ -1,8 +1,9 @@ -from api.scopes import SCOPES_TO_DESCRIPTION +from django.conf import settings API_SERVICE_CLIENT_CREDENTIALS = 'API Service OAuth2 Client Credentials' API_SERVICE_ACCESS_CODE = 'API Service OAuth2 Access Code' +SCOPES_TO_DESCRIPTION = getattr(settings, 'API_GATEWAY_SCOPES_TO_DESCRIPTION', {}) SECURITY_DEFINITIONS = { API_SERVICE_CLIENT_CREDENTIALS: { -- GitLab