From 18447f83716ed64715d89f3859f30227b79ee71d Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 2 Mar 2023 17:13:46 +0100 Subject: [PATCH] (test) OIDC testing --- app/views/application/sso_redirect.html.erb | 2 +- env.example | 2 + scripts/tests.sh | 2 +- test/fixtures/history_values.yml | 4 +- test/helpers/auth_provider_helper.rb | 28 ++++++++++ test/integration/open_id_connect_test.rb | 59 +++++++++++++++++++++ test/test_helper.rb | 6 ++- 7 files changed, 98 insertions(+), 5 deletions(-) create mode 100644 test/integration/open_id_connect_test.rb diff --git a/app/views/application/sso_redirect.html.erb b/app/views/application/sso_redirect.html.erb index 1d57b5c15..3ae666c26 100644 --- a/app/views/application/sso_redirect.html.erb +++ b/app/views/application/sso_redirect.html.erb @@ -7,7 +7,7 @@ <% param = @authorization_token ? "?auth_token=#{@authorization_token}" : '' %> - <% url_path = File.join(root_url, "users/auth/#{@active_provider.strategy_name}#{param}") %> + <% url_path = URI.join("#{ENV.fetch('DEFAULT_PROTOCOL')}://#{ENV.fetch('DEFAULT_HOST')}", "users/auth/#{@active_provider.strategy_name}#{param}") %>
<%= hidden_field_tag :authenticity_token, @authentication_token %>