diff --git a/arkid/core/extension/app_protocol.py b/arkid/core/extension/app_protocol.py index d899120b2..da6aadc72 100644 --- a/arkid/core/extension/app_protocol.py +++ b/arkid/core/extension/app_protocol.py @@ -7,6 +7,8 @@ from arkid.core.extension import Extension from arkid.core.translation import gettext_default as _ from arkid.core import api as core_api, event as core_event +from django.utils.decorators import method_decorator +from django.views.decorators.csrf import csrf_exempt import urllib.parse @@ -90,6 +92,7 @@ def register_enter_view(self, view:View, path:str, url_name:str, type:list, tena response: 函数执行结果 ''' # 入口函数 + @method_decorator(csrf_exempt, name="dispatch") class EnterView(View): def get(self, request, **kwargs): diff --git a/oauth2_provider/views/base.py b/oauth2_provider/views/base.py index 48fb8ea16..52bf3e62a 100644 --- a/oauth2_provider/views/base.py +++ b/oauth2_provider/views/base.py @@ -375,6 +375,7 @@ def post(self, request, *args, **kwargs): else: return super().post(request, *args, **kwargs) + def get(self, request, *args, **kwargs): try: scopes, credentials = self.validate_authorization_request(request)