Commit 2e1e1f4e authored by Ash McKenzie's avatar Ash McKenzie Committed by GitLab Release Tools Bot

Merge branch 'sh-fix-openid-connect-defaults' into 'master'

Make OpenID Connect work without requiring a name

Closes #62208

See merge request gitlab-org/gitlab-ce!29312

(cherry picked from commit ad94a024)

a30d8e4a Make OpenID Connect work without requiring a name
parent 1a2e3b72
---
title: Make OpenID Connect work without requiring a name
merge_request: 29312
author:
type: fixed
......@@ -63,6 +63,12 @@ module Gitlab
{ remote_sign_out_handler: authentiq_signout_handler }
when 'shibboleth'
{ fail_with_empty_uid: true }
when 'openid_connect'
# If a name argument is omitted, OmniAuth will expect that the
# matching route is /auth/users/openidconnect instead of
# /auth/users/openid_connect because of
# https://gitlab.com/gitlab-org/gitlab-ce/issues/62208#note_178780341.
{ name: 'openid_connect' }
else
{}
end
......
......@@ -83,5 +83,13 @@ describe Gitlab::OmniauthInitializer do
subject.execute([cas3_config])
end
it 'configures name for openid_connect' do
openid_connect_config = { 'name' => 'openid_connect', 'args' => {} }
expect(devise_config).to receive(:omniauth).with(:openid_connect, name: 'openid_connect')
subject.execute([openid_connect_config])
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment