File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed
Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change 88
99
1010class ActiveSessionAuthentication (authentication .BaseAuthentication ):
11- authentication_header_prefix = "Bearer"
1211
1312 auth_error_message = {
1413 "success" : False ,
@@ -19,23 +18,12 @@ def authenticate(self, request):
1918
2019 request .user = None
2120
22- auth_header = authentication .get_authorization_header (request ).split ()
23- auth_header_prefix = self .authentication_header_prefix .lower ()
21+ auth_header = authentication .get_authorization_header (request )
2422
2523 if not auth_header :
2624 return None
2725
28- if len (auth_header ) == 1 :
29- return None
30-
31- elif len (auth_header ) > 2 :
32- return None
33-
34- prefix = auth_header [0 ].decode ('utf-8' )
35- token = auth_header [1 ].decode ('utf-8' )
36-
37- if prefix .lower () != auth_header_prefix :
38- return None
26+ token = auth_header .decode ('utf-8' )
3927
4028 return self ._authenticate_credentials (token )
4129
You can’t perform that action at this time.
0 commit comments