Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/o_auth/provider.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/gitlab/o_auth/provider.rb b/lib/gitlab/o_auth/provider.rb
new file mode 100644
index 00000000000..f986499a27c
--- /dev/null
+++ b/lib/gitlab/o_auth/provider.rb
@@ -0,0 +1,19 @@
+module Gitlab
+ module OAuth
+ class Provider
+ def self.names
+ providers = []
+
+ Gitlab.config.ldap.servers.values.each do |server|
+ providers << server['provider_name']
+ end
+
+ Gitlab.config.omniauth.providers.each do |provider|
+ providers << provider['name']
+ end
+
+ providers
+ end
+ end
+ end
+end