Skip to content

Commit

Permalink
fix(oauth2_provider/views/base.py): short of the permission_classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Oo-RR-oO committed Aug 26, 2020
1 parent 986257f commit d7cb955
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions oauth2_provider/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from django.http import HttpResponse, HttpResponseRedirect, JsonResponse
from django.urls import reverse
from jwkest import long_to_base64
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework.exceptions import PermissionDenied
Expand Down Expand Up @@ -423,6 +424,7 @@ def post(self, request, *args, **kwargs):

class UserInfoOauthView(APIView):
authentication_classes = [OAuth2Backend]
permission_classes = [IsAuthenticated]

def get(self, request):
user = request.user
Expand All @@ -444,6 +446,7 @@ def get(self, request):

class UserInfoOidcView(APIView):
authentication_classes = [OAuth2Backend]
permission_classes = [IsAuthenticated]

def get(self, request):
user = request.user
Expand Down

0 comments on commit d7cb955

Please sign in to comment.