-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to configure an "external" redirect_uri, as well as a "local" path to recognize as an authorization callback #453
Comments
Not sure when I will get to this, but I think I'd prefer a new separate configuration parameter to make its purpose more clear. Need to think about it again, though. |
Thanks. Any two properties are fine, as long as one means "this is the URL that you need to provide as the redirect_url to the authorization server", and "this is the path is used to recognize it as a redirection callback" will work. For now, we are using the full path (redirect_uri), and then rather than having our front end router strip the path they proxy with the full path, and we strip it out in our sidecar, just after the open resty Lua block, but before going to the application. But long term, it is better to have our front end router strip it, then all applications can use the same sidecar (that does not need to strip an app-specific path). |
see #453 Signed-off-by: Stefan Bodewig <stefan.bodewig@innoq.com>
Sorry, it took longer than I had hoped. A new |
Thank you! Just saw this now, which is good timing as we are updating our sidecar. Will give this a try. |
this is part of the 1.7.6 release. |
Dear Mr. @bodewig : And this is my lua:
could you help me to solves this ? |
As mentined in this comment:
#450 (comment)
Our application is using an nginx sidecar with lua-resty-openidc, and our application is behind an inbound reverse proxy that uses URLs with a prefix like "app-name" as in "https://app-name/some/path" to route. But our application is not aware of "app-name" and only looks for paths like /some/path. We thought that we could use:
opts.redirect_uri => Configure the full redirection URI to give to the auth server (https://host/app-name/callback)
opts.redirect_uri_path => Configure the path to recognize as in inbound authorization callback (/callback)
It seems that if we put the "opts.redirect_uri_path" in FRONT of the "and" statement that this would work:
https://github.com/zmartzone/lua-resty-openidc/blob/master/lib/resty/openidc.lua#L1437
However the code also indicates that "redirect_uri_path" is deprecated. It would be nice if it could be used as suggested above, where the external URL that the authorization server needs to redirect to is different from the path used to recognize it as an authorization callback.
The text was updated successfully, but these errors were encountered: