mirror of https://gitlab.crans.org/bde/nk20
fix some breaking changes and linters
This commit is contained in:
parent
516a7f4be5
commit
d228dbf225
|
@ -44,6 +44,8 @@ class PermissionOAuth2Validator(OAuth2Validator):
|
|||
subset of permissions.
|
||||
"""
|
||||
|
||||
oidc_claim_scope = None # fix breaking change of django-oauth-toolkit 2.0.0
|
||||
|
||||
valid_scopes = set()
|
||||
|
||||
for t in Permission.PERMISSION_TYPES:
|
||||
|
|
|
@ -25,8 +25,8 @@ admin_site.register(Site, SiteAdmin)
|
|||
|
||||
# Add external apps model
|
||||
if "oauth2_provider" in settings.INSTALLED_APPS:
|
||||
from oauth2_provider.admin import Application, ApplicationAdmin, Grant, \
|
||||
GrantAdmin, AccessToken, AccessTokenAdmin, RefreshToken, RefreshTokenAdmin
|
||||
from oauth2_provider.admin import ApplicationAdmin, GrantAdmin, AccessTokenAdmin, RefreshTokenAdmin
|
||||
from oauth2_provider.model import Application, Grant, AccessToken, RefreshToken
|
||||
admin_site.register(Application, ApplicationAdmin)
|
||||
admin_site.register(Grant, GrantAdmin)
|
||||
admin_site.register(AccessToken, AccessTokenAdmin)
|
||||
|
|
|
@ -263,6 +263,9 @@ OAUTH2_PROVIDER = {
|
|||
'REFRESH_TOKEN_EXPIRE_SECONDS': timedelta(days=14),
|
||||
}
|
||||
|
||||
# PKCE (fix a breaking change of django-oauth-toolkit 2.0.0)
|
||||
PKCE_REQUIRED = False
|
||||
|
||||
# Take control on how widget templates are sourced
|
||||
# See https://docs.djangoproject.com/en/2.2/ref/forms/renderers/#templatessetting
|
||||
FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'
|
||||
|
|
Loading…
Reference in New Issue