Skip to content
Snippets Groups Projects
Commit a97774bc authored by HeJ's avatar HeJ
Browse files

Merge branch 'fix/sso' into 'develop'

SSO: add CSP policy 'form_action: *'

See merge request !1105
parents 6c71c571 e9b314b2
Branches
Tags
No related merge requests found
...@@ -2,6 +2,7 @@ import calendar ...@@ -2,6 +2,7 @@ import calendar
import json import json
import logging import logging
from csp.decorators import csp_update
from oauth2_provider.models import get_access_token_model from oauth2_provider.models import get_access_token_model
from oauth2_provider.views import AuthorizationView, ClientProtectedScopedResourceView from oauth2_provider.views import AuthorizationView, ClientProtectedScopedResourceView
...@@ -24,12 +25,14 @@ class SelectedConferenceContextMixin: ...@@ -24,12 +25,14 @@ class SelectedConferenceContextMixin:
return ctx return ctx
@method_decorator(csp_update(form_action='*'), name='dispatch')
class OutOfBandDisplayTokenView(SelectedConferenceContextMixin, TemplateView): class OutOfBandDisplayTokenView(SelectedConferenceContextMixin, TemplateView):
template_name = 'oauth2_provider/out-of-band-display-token.html' template_name = 'oauth2_provider/out-of-band-display-token.html'
@method_decorator(csp_update(form_action='*'), name='dispatch')
class AuthorizeView(SelectedConferenceContextMixin, AuthorizationView): class AuthorizeView(SelectedConferenceContextMixin, AuthorizationView):
pass template_name = 'oauth2_provider/authorize.html'
@method_decorator(csrf_exempt, name='dispatch') @method_decorator(csrf_exempt, name='dispatch')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment