File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ Julien Palard
75
75
Jun Zhou
76
76
Kaleb Porter
77
77
Kristian Rune Larsen
78
+ Lazaros Toumanidis
78
79
Ludwig Hähne
79
80
Łukasz Skarżyński
80
81
Marcus Sonestedt
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
36
36
* #1336 Fix encapsulation for Redirect URI scheme validation
37
37
* #1357 Move import of setting_changed signal from test to django core modules
38
38
* #1268 fix prompt=none redirects to login screen
39
+ * #1381 fix AttributeError in OAuth2ExtraTokenMiddleware when a custom AccessToken model is used
39
40
40
41
### Removed
41
42
* #1350 Remove support for Python 3.7 and Django 2.2
Original file line number Diff line number Diff line change 3
3
from django .contrib .auth import authenticate
4
4
from django .utils .cache import patch_vary_headers
5
5
6
- from oauth2_provider .models import AccessToken
6
+ from oauth2_provider .models import get_access_token_model
7
7
8
8
9
9
log = logging .getLogger (__name__ )
@@ -53,6 +53,7 @@ def __call__(self, request):
53
53
authheader = request .META .get ("HTTP_AUTHORIZATION" , "" )
54
54
if authheader .startswith ("Bearer" ):
55
55
tokenstring = authheader .split ()[1 ]
56
+ AccessToken = get_access_token_model ()
56
57
try :
57
58
token = AccessToken .objects .get (token = tokenstring )
58
59
request .access_token = token
You can’t perform that action at this time.
0 commit comments