[Django]-Django TokenAuthentication – extending JWT obtain_jwt_token

4👍

obtain_jwt_token is just a reference to a view, and as with any view you can just subclass it and reference that instead

class MySpecialJWT(ObtainJSONWebToken):
    def post(self, request, *args, **kwargs):
        response = super().post(request, *args, **kwargs)
        # foo bar
        return response
👤Sayse

Leave a comment