Make the scopes dynamic based on app config.
This commit is contained in:
parent
053ceb6220
commit
f5ee7a6697
3 changed files with 14 additions and 7 deletions
|
@ -220,7 +220,8 @@ def swagger_route_data(include_internal=False, compact=False):
|
|||
"type": "oauth2",
|
||||
"flow": "implicit",
|
||||
"authorizationUrl": "%s://%s/oauth/authorize" % (PREFERRED_URL_SCHEME, SERVER_HOSTNAME),
|
||||
'scopes': {scope.scope:scope.description for scope in scopes.ALL_SCOPES.values()},
|
||||
'scopes': {scope.scope:scope.description
|
||||
for scope in scopes.app_scopes(app.config).values()},
|
||||
},
|
||||
},
|
||||
'paths': paths,
|
||||
|
|
Reference in a new issue