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

SSO: add CSP policy 'form_action: *'

The OAuth2 workflow demands that a POST request be made back to the
requesting application. That request is currently blocked by CSP.
parent 2a38dcf6
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ import calendar
import json
import logging
from csp.decorators import csp_update
from oauth2_provider.models import get_access_token_model
from oauth2_provider.views import AuthorizationView, ClientProtectedScopedResourceView
......@@ -24,12 +25,14 @@ class SelectedConferenceContextMixin:
return ctx
@method_decorator(csp_update(form_action='*'), name='dispatch')
class OutOfBandDisplayTokenView(SelectedConferenceContextMixin, TemplateView):
template_name = 'oauth2_provider/out-of-band-display-token.html'
@method_decorator(csp_update(form_action='*'), name='dispatch')
class AuthorizeView(SelectedConferenceContextMixin, AuthorizationView):
pass
template_name = 'oauth2_provider/authorize.html'
@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