summaryrefslogtreecommitdiff
path: root/lib/gitlab/omniauth_initializer.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@13-0-stable-eeGitLab Bot2020-05-201-35/+48
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-131-0/+2
|
* Symbolize client_auth_method for quirked providersVincent Fazio2019-07-151-0/+10
| | | | | | | | | | | 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: Vincent Fazio <vfazio@xes-inc.com>
* Bump omniauth_openid_connect to 0.3.1sh-update-openid-omniauth-gemStan Hu2019-06-081-6/+0
| | | | | | | | | | | | In https://gitlab.com/gitlab-org/gitlab-ce/issues/62208, users were seeing 404 errors when they configured their OpenID provider without a name parameter since OmniAuth would use the name `openidconnect` instead `openid_connect`. https://github.com/m0n9oose/omniauth_openid_connect/pull/23 makes the default parameter `openid_connect` so this additional initializer in GitLab is not necessary. Plus, this change enables users to use multiple OpenID Connect providers if they desire.
* Make OpenID Connect work without requiring a namesh-fix-openid-connect-defaultsStan Hu2019-06-061-0/+6
| | | | | | | | | | | | | | | | | | If there is no name argument given, OmniAuth will try to guess the name by the class name. In https://github.com/omniauth/omniauth/blob/v1.9.0/lib/omniauth/strategy.rb#L139, `OmniAuth::Strategies::OpenIDConnect` gets translated to `openidconnect`. This leads to an immediate 404 error after clicking the login button because OmniAuth can't match the current route (/users/auth/openid_connect) against the expected one (/users/auth/openidconnect). Other providers, such as Google OAuth2, set this name as the default option within the OmniAuth Strategy. Until a fix is merged upstream, let's just set the parameter ourselves. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/62208
* Fix OmniAuth OAuth2Generic strategy not loadingStan Hu2019-05-231-1/+14
| | | | | | | | | | | | | In https://github.com/rails/rails/commit/83b767ce, Rails 5.1 removed support for using a String to specify a middleware. When the strategy_class argument is passed from the GitLab YAML config to Devise, Devise passes the string value straight through to Rails, and GitLab would crash with a NoMethodError inside ActionDispatch::MiddlewareStack. To make this OmniAuth strategy work again, we normalize the arguments by converting the strategy_class value into an actual Class. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/62216
* Enable frozen string for lib/gitlab/*.rbgfyoung2018-10-221-0/+2
|
* Disable SAML if OmniAuth is disabled48932-disable-saml-if-omniauth-is-disabledLin Jen-Shin2018-07-201-7/+23
| | | | | We also try to unify the way we setup OmniAuth, and how we check if it's enabled or not.
* If `omniauth_auto_sign_in_with_provider` is set,Lin Jen-Shin2018-07-021-0/+5
| | | | it also means we're using omniauth, so we need to set it up.
* OmniauthInitializer refactoringjej/omniauth-initializer-refactorJames Edwards-Jones2018-03-221-33/+31
|
* Omniauth callbacks moved to methodsJames Edwards-Jones2018-03-201-26/+38
|
* OmniauthInitializer created to improve devise.rbJames Edwards-Jones2018-03-201-0/+65
This should simplify refactoring and allow testing