forked from ietf-tools/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix-oidc-access-token-post.patch
More file actions
28 lines (23 loc) · 1002 Bytes
/
fix-oidc-access-token-post.patch
File metadata and controls
28 lines (23 loc) · 1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
diff -ur oidc_provider.orig/lib/utils/common.py oidc_provider/lib/utils/common.py
--- oidc_provider.orig/lib/utils/common.py 2020-05-22 15:09:21.009044320 +0200
+++ oidc_provider/lib/utils/common.py 2020-06-04 16:00:12.049562502 +0200
@@ -19,6 +19,7 @@
"""
response = HttpResponse('', status=302)
response['Location'] = uri
+ response.url = uri
return response
--- oidc_provider.orig/lib/utils/oauth2.py 2020-05-22 15:09:21.009044320 +0200
+++ oidc_provider/lib/utils/oauth2.py 2020-06-05 17:05:23.271285858 +0200
@@ -22,9 +22,13 @@
auth_header = request.META.get('HTTP_AUTHORIZATION', '')
if re.compile(r'^[Bb]earer\s{1}.+$').match(auth_header):
access_token = auth_header.split()[1]
- else:
+ elif request.method == 'GET':
access_token = request.GET.get('access_token', '')
+ elif request.method == 'POST':
+ access_token = request.POST.get('access_token', '')
+ else:
+ access_token = ''
return access_token