Class: Gitlab::Auth::Saml::AuthHash

Inherits:
OAuth::AuthHash show all
Defined in:
lib/gitlab/auth/saml/auth_hash.rb

Instance Attribute Summary

Attributes inherited from OAuth::AuthHash

#auth_hash, #errors

Instance Method Summary collapse

Methods inherited from OAuth::AuthHash

#email, #has_attribute?, #initialize, #job_title, #location, #name, #organization, #password, #provider, #uid, #username

Constructor Details

This class inherits a constructor from Gitlab::Auth::OAuth::AuthHash

Instance Method Details

#authn_contextObject



15
16
17
18
19
20
# File 'lib/gitlab/auth/saml/auth_hash.rb', line 15

def authn_context
  response_object = auth_hash.extra[:response_object]
  return unless response_object.is_a?(OneLogin::RubySaml::Response)

  response_object.authn_context_class_ref
end

#azure_group_overage_claim?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/gitlab/auth/saml/auth_hash.rb', line 11

def azure_group_overage_claim?
  get_raw('http://schemas.microsoft.com/claims/groups.link').present?
end

#groupsObject



7
8
9
# File 'lib/gitlab/auth/saml/auth_hash.rb', line 7

def groups
  Array.wrap(get_raw(Gitlab::Auth::Saml::Config.new(auth_hash.provider).groups))
end