Open superandrew opened 6 years ago
alright so this is my implementation: import datetime from rest_framework_jwt.settings import api_settings
def jwt_response_payload_handler(token, user=None, request=None):
return {
'token': token,
'exp': datetime.datetime.utcnow() + api_settings.JWT_EXPIRATION_DELTA
}
where is that date checked? I checked the db but found no tables where this information is stored. Sorry but I'm not finding this on the docs.
Actually, it's a part of a token. You can check jwt_decode_handler
method where token is decoded by jwt
library. Also that library performs multiple checks, such as checking expiry time.
I searched the documentation for a setting that allows to expose the token expiration. I implemented a response handler, but i don't know where to take the expiration date.
Something like:
Thanks