nginxluaopenrestyrestylua-resty-openidc

Pass custom parameters with the authorization request using lua-resty-openidc


I'm using lua-resty-openidc to configure NGINX as an OIDC RP with my Authorization Server.

My requirement is to pass a value from the initial request coming to the Nginx (from the browser, let's say a query param), in the authorization code request to the Authorization Server (from Nginx).

Is there a way to achieve this? Appreciate any help on this.


Solution

  • You can pass custom parameters by setting opts.authorization_params as shown in the sample in README.md and here: https://github.com/zmartzone/lua-resty-openidc/blob/master/lib/resty/openidc.lua#L309