django-rest-framework-jwt icon indicating copy to clipboard operation
django-rest-framework-jwt copied to clipboard

setting JWT_PAYLOAD_GET_USER_ID_HANDLER ignored

Open SPKorhonen opened this issue 7 years ago • 3 comments

User_id is read directly from payload leading to problems when using custom encoding on user_id field. Trivial fix: use api_settings.JWT_PAYLOAD_GET_USER_ID_HANDLER instead of payload.get('user_id'). Fixes issue #379

SPKorhonen avatar Sep 22 '17 08:09 SPKorhonen

Can you add a test, please?

blueyed avatar Sep 22 '17 11:09 blueyed

Tests added to exercise the code paths within jwt_get_secret_key

SPKorhonen avatar Sep 26 '17 09:09 SPKorhonen

Could you please merge this PR?

paolodamico avatar Dec 18 '17 20:12 paolodamico