debian-mirror-gitlab/lib/gitlab/auth/saml/config.rb

38 lines
772 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
2018-03-27 19:54:05 +05:30
module Gitlab
module Auth
module Saml
class Config
class << self
2022-07-16 23:28:13 +05:30
def enabled?
::AuthHelper.saml_providers.any?
end
2018-03-27 19:54:05 +05:30
def options
2018-05-09 12:01:36 +05:30
Gitlab::Auth::OAuth::Provider.config_for('saml')
2018-03-27 19:54:05 +05:30
end
2018-11-08 19:23:39 +05:30
def upstream_two_factor_authn_contexts
options.args[:upstream_two_factor_authn_contexts]
end
2018-03-27 19:54:05 +05:30
def groups
options[:groups_attribute]
end
def external_groups
options[:external_groups]
end
2018-11-08 19:23:39 +05:30
def admin_groups
options[:admin_groups]
end
2018-03-27 19:54:05 +05:30
end
end
end
end
end
2020-05-24 23:13:21 +05:30
2021-06-08 01:23:25 +05:30
Gitlab::Auth::Saml::Config.prepend_mod_with('Gitlab::Auth::Saml::Config')