Skip to content

Commit 3454b90

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 110b73f commit 3454b90

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

oauth2_provider/compat.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
The `compat` module provides support for backwards compatibility with older
33
versions of Django and Python.
44
"""
5+
56
try:
67
# Django 5.1 introduced LoginRequiredMiddleware, and login_not_required decorator
78
from django.contrib.auth.decorators import login_not_required
89
except ImportError:
10+
911
def login_not_required(view_func):
1012
return view_func
1113

12-
__all__ = ['login_not_required']
14+
15+
__all__ = ["login_not_required"]

oauth2_provider/views/oidc.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939

4040
Application = get_application_model()
4141

42+
4243
@method_decorator(login_not_required, name="dispatch")
4344
class ConnectDiscoveryInfoView(OIDCOnlyMixin, View):
4445
"""
@@ -106,6 +107,7 @@ def get(self, request, *args, **kwargs):
106107
response["Access-Control-Allow-Origin"] = "*"
107108
return response
108109

110+
109111
@method_decorator(login_not_required, name="dispatch")
110112
class JwksInfoView(OIDCOnlyMixin, View):
111113
"""
@@ -212,6 +214,7 @@ def _validate_claims(request, claims):
212214

213215
return True
214216

217+
215218
@method_decorator(login_not_required, name="dispatch")
216219
class RPInitiatedLogoutView(OIDCLogoutOnlyMixin, FormView):
217220
template_name = "oauth2_provider/logout_confirm.html"

0 commit comments

Comments
 (0)