diff options
author | Stan Hu <stanhu@gmail.com> | 2019-07-16 00:40:09 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-07-16 00:40:09 +0300 |
commit | fea51969fbc5fcb843b9cbb40e8a13faf117d032 (patch) | |
tree | a94a1db58fffe050be5115f70c68b362b6035cce /lib | |
parent | b46cf4290b8efa5e17ea741d1a093042a8d5475a (diff) | |
parent | 97432c9366b433aafae67706c9efb5536e68e7f1 (diff) |
Merge branch '64407-vfazio-quirk-omniauth-strategies-openidconnect' into 'master'
Convert client_auth_method to a Symbol for quirked OmniAuth providers
Closes #64407
See merge request gitlab-org/gitlab-ce!30683
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/omniauth_initializer.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/gitlab/omniauth_initializer.rb b/lib/gitlab/omniauth_initializer.rb index 2a2083ebae0..ad1377a0892 100644 --- a/lib/gitlab/omniauth_initializer.rb +++ b/lib/gitlab/omniauth_initializer.rb @@ -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 |