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

Instance Method Summary collapse

Methods inherited from OAuth::AuthHash

#email, #has_attribute?, #initialize, #location, #name, #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
21
22
23
24
# File 'lib/gitlab/auth/saml/auth_hash.rb', line 15

def authn_context
  response_object = auth_hash.extra[:response_object]
  return if response_object.blank?

  document = response_object.decrypted_document
  document ||= response_object.document
  return if document.blank?

  extract_authn_context(document)
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