-
Notifications
You must be signed in to change notification settings - Fork 651
jwt_payload_handler needs request? #308
Comments
You should override ObtainJSONWebToken view and ObtainJSONWebToken serializer. // urls.py //views.py //serializers.py
//utils.py
//settings.py
} |
Passing the request as a second argument (after the @jpadilla, do you have compelling arguments against doing that, other than backwards compatibility? It would be extremely handy, and I can think of lot's of other cases for it (in my case: Optionally add data to the payload, based on POST data). |
#484 The project is not maintained. Use https://github.com/Styria-Digital/django-rest-framework-jwt or https://github.com/davesque/django-rest-framework-simplejwt |
I'm working on a django project that will support multiple sites, therefore the payload of my token will be different depending on what the domain of the request is (I'm using the RequestSite methodology rather than SITE_ID). Is there a way to get the request object into the jwt_payload_handler that doesn't require passing it as a parameter? I don't see an obvious way, but I don't want to rewrite the source if there's a recommended way. Thanks.
The text was updated successfully, but these errors were encountered: