title: Decode JWT token on nginx server and log it
body: <p>We are using nginx server for reverse proxying few micro-services. Every request has <code>Authorization</code> header containing JWT token. Now, what we need to do is extract user details from JWT token and log it on nginx server. Is there anyway to decode and log JWT? I looked into few lua scripts for authenticating request using JWT but that is not what we need. Also, we are trying to avoid using installing Lua on nginx server.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p><strong>EDIT:</strong> We are fine with Lua based solution as well.</p>