Class: Gitlab::Auth::Saml::Config
- Inherits:
-
Object
- Object
- Gitlab::Auth::Saml::Config
- Defined in:
- lib/gitlab/auth/saml/config.rb
Constant Summary collapse
- DEFAULT_PROVIDER_NAME =
'saml'
Class Method Summary collapse
Instance Method Summary collapse
- #admin_groups ⇒ Object
- #external_groups ⇒ Object
- #groups ⇒ Object
-
#initialize(provider = DEFAULT_PROVIDER_NAME) ⇒ Config
constructor
A new instance of Config.
- #options ⇒ Object
- #upstream_two_factor_authn_contexts ⇒ Object
Constructor Details
#initialize(provider = DEFAULT_PROVIDER_NAME) ⇒ Config
Returns a new instance of Config.
15 16 17 |
# File 'lib/gitlab/auth/saml/config.rb', line 15 def initialize(provider = DEFAULT_PROVIDER_NAME) @provider = provider end |
Class Method Details
.enabled? ⇒ Boolean
8 9 10 |
# File 'lib/gitlab/auth/saml/config.rb', line 8 def enabled? ::AuthHelper.saml_providers.any? end |
Instance Method Details
#admin_groups ⇒ Object
35 36 37 |
# File 'lib/gitlab/auth/saml/config.rb', line 35 def admin_groups [:admin_groups] end |
#external_groups ⇒ Object
31 32 33 |
# File 'lib/gitlab/auth/saml/config.rb', line 31 def external_groups [:external_groups] end |
#groups ⇒ Object
27 28 29 |
# File 'lib/gitlab/auth/saml/config.rb', line 27 def groups [:groups_attribute] end |
#options ⇒ Object
19 20 21 |
# File 'lib/gitlab/auth/saml/config.rb', line 19 def Gitlab::Auth::OAuth::Provider.config_for(@provider) end |
#upstream_two_factor_authn_contexts ⇒ Object
23 24 25 |
# File 'lib/gitlab/auth/saml/config.rb', line 23 def upstream_two_factor_authn_contexts .args[:upstream_two_factor_authn_contexts] end |