Send User details in headers to upstream server along with JWT token

Hi,

In various Kong community docs and forums, it is mentioned that Kong passes below headers to the upstream service along with the JWT token.

  • X-Consumer-ID , the ID of the Consumer on Kong
  • X-Consumer-Custom-ID , the custom_id of the Consumer (if set)
  • X-Consumer-Username , the username of the Consumer (if set)

But when we try to access the APIs using JWT token, we are getting only JWT token and not the above mentioned user headers.
Can anyone please help and let us know how we can get above headers on the upstream server without using any external plugin.