Auth route /whoami for nginx subrequest auth, support changing the session cookie domain for that purpose

This commit is contained in:
bluepython508
2023-11-08 09:36:30 +00:00
parent 54db8727b0
commit 93cd897b0e
6 changed files with 20 additions and 4 deletions

View File

@@ -74,6 +74,12 @@ defmodule SsoBsnWeb.Router do
delete "/users/log_out", UserSessionController, :delete
end
scope "/", SsoBsnWeb do
pipe_through [:api, :fetch_session, :fetch_current_user, :require_authenticated_user]
get "/whoami", UserSessionController, :check_auth
end
# OIDC
scope "/oauth", SsoBsnWeb.Oauth do