This repository was archived by the owner on May 26, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change 1313 User = get_user_model ()
1414
1515
16- jwt_decode_handler = api_settings .DEFAULT_JWT_DECODE_HANDLER
16+ jwt_decode_handler = api_settings .JWT_DECODE_HANDLER
1717
1818
1919class JSONWebTokenAuthentication (BaseAuthentication ):
Original file line number Diff line number Diff line change 11from django .contrib .auth import authenticate
2- from django .conf import settings
32from rest_framework import serializers
43
54from rest_framework_jwt .settings import api_settings
6- from rest_framework_jwt import jwt
75
86
9- jwt_payload_handler = api_settings .DEFAULT_JWT_PAYLOAD_HANDLER
10- jwt_encode_handler = api_settings .DEFAULT_JWT_ENCODE_HANDLER
7+ jwt_payload_handler = api_settings .JWT_PAYLOAD_HANDLER
8+ jwt_encode_handler = api_settings .JWT_ENCODE_HANDLER
119
1210
1311class JSONWebTokenSerializer (serializers .Serializer ):
Original file line number Diff line number Diff line change 77USER_SETTINGS = getattr (settings , 'JWT_AUTH' , None )
88
99DEFAULTS = {
10- 'DEFAULT_JWT_ENCODE_HANDLER ' :
10+ 'JWT_ENCODE_HANDLER ' :
1111 'rest_framework_jwt.utils.jwt_encode_handler' ,
1212
13- 'DEFAULT_JWT_DECODE_HANDLER ' :
13+ 'JWT_DECODE_HANDLER ' :
1414 'rest_framework_jwt.utils.jwt_decode_handler' ,
1515
16- 'DEFAULT_JWT_PAYLOAD_HANDLER ' :
16+ 'JWT_PAYLOAD_HANDLER ' :
1717 'rest_framework_jwt.utils.jwt_payload_handler' ,
1818
1919 'JWT_SECRET_KEY' : settings .SECRET_KEY ,
2626
2727# List of settings that may be in string import notation.
2828IMPORT_STRINGS = (
29- 'DEFAULT_JWT_ENCODE_HANDLER ' ,
30- 'DEFAULT_JWT_DECODE_HANDLER ' ,
31- 'DEFAULT_JWT_PAYLOAD_HANDLER ' ,
29+ 'JWT_ENCODE_HANDLER ' ,
30+ 'JWT_DECODE_HANDLER ' ,
31+ 'JWT_PAYLOAD_HANDLER ' ,
3232)
3333
3434api_settings = APISettings (USER_SETTINGS , DEFAULTS , IMPORT_STRINGS )
You can’t perform that action at this time.
0 commit comments