Commit 83a870bf authored by Vincent Fazio's avatar Vincent Fazio

Symbolize client_auth_method for quirked providers

Providers such as OpenIDConnect ultimately leverage the rack-oauth2
gem which requires the client_auth_method value to be defined as a
symbol in order to correctly select the authorization method used.

Derivative providers that specify OmniAuth::Strategies::OpenIDConnect as
their strategy_class will also convert this value to a symbol.
Signed-off-by: default avatarVincent Fazio <vfazio@xes-inc.com>
parent f69232d5
......@@ -52,6 +52,16 @@ module Gitlab
args[:strategy_class] = args[:strategy_class].constantize
end
# Providers that are known to depend on rack-oauth2, like those using
# Omniauth::Strategies::OpenIDConnect, need to be quirked so the
# client_auth_method argument value is passed as a symbol.
if (args[:strategy_class] == OmniAuth::Strategies::OpenIDConnect ||
args[:name] == 'openid_connect') &&
args[:client_auth_method].is_a?(String)
args[:client_auth_method] = args[:client_auth_method].to_sym
end
args
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