nginxinc / nginx-openid-connect

Reference implementation of OpenID Connect integration for NGINX Plus
https://www.nginx.com/products/nginx/
Other
199 stars 94 forks source link

JWT and Claims Sent to the web service? #31

Closed ayoung closed 3 years ago

ayoung commented 3 years ago

Are the JWT and claims forwarded to the backend web service? How does the web service get any information about who was logged in, his identity, permissions etc?

lcrilly commented 3 years ago

All JWT claims are available as embedded variables: http://nginx.org/en/docs/http/ngx_http_auth_jwt_module.html#variables

Pass them to the backend as you wish. An example is present in the reference configuration: https://github.com/nginxinc/nginx-openid-connect/blob/main/frontend.conf#L29

If you wish to pass the entire JWT, it is available in the $session_jwt variable.