Commit 7ea0bc4e authored by Sean McGivern's avatar Sean McGivern

Merge branch 'feature/omniauth_ding_talk' into 'master'

Feature: Let OmniAuth support DingTalk

See merge request gitlab-org/gitlab!72071
parents d3f200b0 b1999a4b
......@@ -38,6 +38,7 @@ gem 'omniauth-auth0', '~> 2.0.0'
gem 'omniauth-azure-activedirectory-v2', '~> 1.0'
gem 'omniauth-azure-oauth2', '~> 0.0.9' # Deprecated v1 version
gem 'omniauth-cas3', '~> 1.1.4'
gem 'omniauth-dingtalk-oauth2', '~> 1.0'
gem 'omniauth-facebook', '~> 4.0.0'
gem 'omniauth-github', '~> 1.4'
gem 'omniauth-gitlab', '~> 1.0.2'
......
......@@ -841,6 +841,8 @@ GEM
addressable (~> 2.3)
nokogiri (~> 1.7, >= 1.7.1)
omniauth (~> 1.2)
omniauth-dingtalk-oauth2 (1.0.0)
omniauth-oauth2 (~> 1.7.1)
omniauth-facebook (4.0.0)
omniauth-oauth2 (~> 1.2)
omniauth-github (1.4.0)
......@@ -1547,6 +1549,7 @@ DEPENDENCIES
omniauth-azure-activedirectory-v2 (~> 1.0)
omniauth-azure-oauth2 (~> 0.0.9)
omniauth-cas3 (~> 1.1.4)
omniauth-dingtalk-oauth2 (~> 1.0)
omniauth-facebook (~> 4.0.0)
omniauth-github (~> 1.4)
omniauth-gitlab (~> 1.0.2)
......
......@@ -8,6 +8,7 @@ module AuthHelper
azure_oauth2
bitbucket
facebook
dingtalk
github
gitlab
google_oauth2
......
......@@ -1024,6 +1024,9 @@ production: &base
# - { name: 'bitbucket',
# app_id: 'YOUR_APP_ID',
# app_secret: 'YOUR_APP_SECRET' }
# - { name: 'dingtalk',
# app_id: 'YOUR_APP_ID',
# app_secret: 'YOUR_APP_SECRET' }
# - { name: 'gitlab',
# app_id: 'YOUR_APP_ID',
# app_secret: 'YOUR_APP_SECRET',
......@@ -1515,6 +1518,9 @@ test:
- { name: 'bitbucket',
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET' }
- { name: 'dingtalk',
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET' }
- { name: 'gitlab',
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET',
......
......@@ -5,6 +5,7 @@ module Gitlab
module OAuth
class Provider
LABELS = {
"dingtalk" => "DingTalk",
"github" => "GitHub",
"gitlab" => "GitLab.com",
"google_oauth2" => "Google",
......
......@@ -31,7 +31,7 @@ RSpec.describe Profiles::AccountsController do
end
end
[:twitter, :facebook, :google_oauth2, :gitlab, :github, :bitbucket, :crowd, :auth0, :authentiq].each do |provider|
[:twitter, :facebook, :google_oauth2, :gitlab, :github, :bitbucket, :crowd, :auth0, :authentiq, :dingtalk].each do |provider|
describe "#{provider} provider" do
let(:user) { create(:omniauth_user, provider: provider.to_s) }
......
......@@ -16,7 +16,7 @@ RSpec.describe 'OAuth Login', :js, :allow_forgery_protection do
end
providers = [:github, :twitter, :bitbucket, :gitlab, :google_oauth2,
:facebook, :cas3, :auth0, :authentiq, :salesforce]
:facebook, :cas3, :auth0, :authentiq, :salesforce, :dingtalk]
around do |example|
with_omniauth_full_host { example.run }
......
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