1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 09:58:23 +02:00

Implement optional scopes : clients can request scopes, but they are not guaranteed to get them

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
2021-12-23 21:59:37 +01:00
parent 132afc3d15
commit 18a1282773
2 changed files with 27 additions and 1 deletions

View File

@ -7,6 +7,8 @@
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
from datetime import timedelta
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# Quick-start development settings - unsuitable for production
@ -248,6 +250,7 @@ REST_FRAMEWORK = {
# OAuth2 Provider
OAUTH2_PROVIDER = {
'SCOPES_BACKEND_CLASS': 'permission.scopes.PermissionScopes',
'OAUTH2_VALIDATOR_CLASS': "permission.scopes.PermissionOAuth2Validator",
}
# Take control on how widget templates are sourced