Skip to content

Commit 76e0a82

Browse files
committed
comments added
1 parent 0c0b926 commit 76e0a82

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

oauth2_provider/views/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,12 @@ def get(self, request, *args, **kwargs):
115115
kwargs['form'] = form
116116

117117
# Check to see if the user has already granted access and return
118-
# a successful response
118+
# a successful response depending on 'approval_prompt' url parameter
119119
require_approval = request.GET.get('approval_prompt', 'force')
120120
if require_approval == 'auto':
121121
tokens = request.user.accesstoken_set.filter(application=kwargs['application'],
122122
expires__gt=timezone.now()).all()
123+
# check past authorizations regarded the same scopes as the current one
123124
for token in tokens:
124125
if token.allow_scopes(scopes):
125126
uri, headers, body, status = self.create_authorization_response(

0 commit comments

Comments
 (0)