Extract JWT Payload into NGINX Variable [http/authorization/jwt]¶
JSON Web Tokens (JWT) are a common way to authenticate to web applications. In addition to authentication, JWTs can also be used to pass information, called claims, about the user to the application. The commercial version of NGINX, NGINX Plus, has built-in JWT handling features. Using njs, we can parse JWTs and extract claim data even in the open source version of NGINX.
Step 1: Use the following commands to start your NGINX container with this lab’s files: