DRF JWT, accessing the token

36 views
Skip to first unread message

Stats Student

unread,
Jan 6, 2021, 6:32:35 PM1/6/21
to django-res...@googlegroups.com
Hi, I am using DRF JWT (https://jpadilla.github.io/django-rest-framework-jwt/) and as part of the authentication process (receiving / verifying the token), I also need to send the token to another endpoint (provided by the authentication service) to obtain additional user information.

I have a JWT_PAYLOAD_GET_USERNAME_HANDLER which would be the logical place to get the additional information, however that handler only receives the token's payload, but not the token itself.

I thought I could make this additional request in JWT_DECODE_HANDLER but I wasn't sure if there were any checks after the decode that I wouldn't want to bypass.

Does anyone know how I can implement this so that once the token is verified and the user is considered authenticated, I can send another request using the access token ?

TIA

Reply all
Reply to author
Forward
0 new messages