-
-
Notifications
You must be signed in to change notification settings - Fork 253
Description
Let me know if you are familiar with this mode of operation.
I have an application that expects REMOTE_USER from the web server. It checks the REMOTE_USER against permissions on individual pages within the application. If a page is private, the application returns 401 or 403 depending on whether REMOTE_USER is set. The web server converts 401 to a redirect to the login page.
In other words, the bulk of the application would pass a flag to openidc.authenticate() to skip the openidc_authorize() call. Instead of doing a redirect, openidc.authenticate() would return 'user not logged in': https://github.com/pingidentity/lua-resty-openidc/blob/master/lib/resty/openidc.lua#L635
The location for the login page would of course continue to do the redirect when the user was not logged in.