Auth route /whoami for nginx subrequest auth, support changing the session cookie domain for that purpose
This commit is contained in:
@@ -23,4 +23,13 @@ defmodule SsoBsnWeb.UserSessionController do
|
||||
|> put_flash(:info, "Logged out successfully.")
|
||||
|> UserAuth.log_out_user()
|
||||
end
|
||||
|
||||
def check_auth(conn, _params) do
|
||||
user = conn.assigns[:current_user]
|
||||
conn
|
||||
|> put_resp_header("X-Auth-Username", user.username)
|
||||
|> json(%{
|
||||
username: user.username
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user