diff --git a/lms/utils.py b/lms/utils.py index 9d16680..2331547 100644 --- a/lms/utils.py +++ b/lms/utils.py @@ -17,6 +17,7 @@ def custom_jwt_payload_handler(user): 'exp': datetime.utcnow() + api_settings.JWT_EXPIRATION_DELTA, 'out_key': str(user.out_key), 'email': user.email, + 'real': True, } if api_settings.JWT_ALLOW_REFRESH: @@ -34,13 +35,7 @@ def custom_jwt_payload_handler(user): class JSONWebTokenAuthentication(BaseJSONWebTokenAuthentication): - """ - Clients should authenticate by passing the token key in the "Authorization" - HTTP header, prepended with the string specified in the setting - `JWT_AUTH_HEADER_PREFIX`. For example: - Authorization: JWT eyJhbGciOiAiSFMyNTYiLCAidHlwIj - """ www_authenticate_realm = 'api' def get_jwt_value(self, request):