use AC autoconf discovery end_session_endpoint

This commit is contained in:
simon lehericey 2024-03-19 11:14:57 +01:00
parent 916407ec95
commit 759d729bf3
2 changed files with 2 additions and 1 deletions

View file

@ -110,6 +110,6 @@ class Users::SessionsController < Devise::SessionsController
def build_agent_connect_logout_url(id_token)
h = { id_token_hint: id_token, post_logout_redirect_uri: logout_url }
"#{ENV['AGENT_CONNECT_BASE_URL']}/api/v2/session/end?#{h.to_query}"
"#{AGENT_CONNECT[:end_session_endpoint]}?#{h.to_query}"
end
end

View file

@ -85,6 +85,7 @@ describe Users::SessionsController, type: :controller do
let(:agent_connect_id_token) { nil }
before do
stub_const("AGENT_CONNECT", { end_session_endpoint: 'http://agent-connect/logout' })
sign_in user
delete :destroy
end