title: How to decode and verify simple-jwt-django-rest-framework token
body: <p>i am trying to verify and decode simple-jwt-django-rest-framework token.
  I know we can use verify api of simple-jwt.
  But i want to decode and verify in my views . Below is the current code i am trying:-</p>
  <pre><code>//in views.py
  
  class home(APIView):
     def post(self,request,*args,**kwargs):
        print(&quot;request is &quot;,request._request)
        verify_token_response = token_verify(request._request)
        print(&quot;status_code is &quot;, verify_token_response.status_code)
  
        if(verify_token_response.status_code == 200):
          jwt_object  = JWTAuthentication() 
          validated_token = jwt_object.get_validated_token(request._request)
          user            = jwt_object.get_user(validated_token)
          print(user)
      
      return Response({
              'status':True, 
              'message':'home'
              })
  </code></pre>
  <p>This code is working for me for token validation. It is validating token correctly , but when i am retrieving the valiated_token and user , it giving me error of :-</p>
  <pre><code>{
      &quot;detail&quot;: &quot;Given token not valid for any token type&quot;,
      &quot;code&quot;: &quot;token_not_valid&quot;,
      &quot;messages&quot;: [
          {
              &quot;token_class&quot;: &quot;AccessToken&quot;,
              &quot;token_type&quot;: &quot;access&quot;,
              &quot;message&quot;: &quot;Token is invalid or expired&quot;
          }
      ]
  }
  </code></pre>