使用 lua-resty-openidc 通过授权请求传递自定义参数

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

我正在使用 lua-resty-openidc 将 NGINX 配置为我的授权服务器的 OIDC RP。

我的要求是将来自初始请求的值传递给 Nginx(来自浏览器,比方说查询参数),在授权代码请求中传递给授权服务器(来自 Nginx)。

有办法实现吗?感谢对此的任何帮助。

您可以通过设置 opts.authorization_params 来传递自定义参数,如 README.md 和此处的示例所示: https://github.com/zmartzone/lua-resty-openidc/blob/master/lib/resty/openidc.lua#L309