Class: SMART_UDAP_HarmonizationTestKit::SMART_UDAP_ContextTest

Inherits:
Inferno::Test
  • Object
show all
Defined in:
lib/smart_udap_harmonization_test_kit/smart_udap_context_test.rb

Overview

rubocop:disable Naming/ClassAndModuleCamelCase

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#token_responseObject

Returns the value of attribute token_response.



3
4
5
# File 'lib/smart_udap_harmonization_test_kit/smart_udap_context_test.rb', line 3

def token_response
  @token_response
end

Instance Method Details

#context_fieldObject



13
14
15
# File 'lib/smart_udap_harmonization_test_kit/smart_udap_context_test.rb', line 13

def context_field
  token_response[context_field_name]
end

#context_field_present?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/smart_udap_harmonization_test_kit/smart_udap_context_test.rb', line 63

def context_field_present?
  context_field.present? || context_field == false
end

#missing_received_context_scopesObject



30
31
32
33
# File 'lib/smart_udap_harmonization_test_kit/smart_udap_context_test.rb', line 30

def missing_received_context_scopes
  @missing_received_context_scopes ||=
    context_scopes.reject { |scope| received_scopes_list.include? scope }
end

#missing_received_context_scopes?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/smart_udap_harmonization_test_kit/smart_udap_context_test.rb', line 59

def missing_received_context_scopes?
  missing_received_context_scopes.present?
end

#missing_received_scopes_stringObject



49
50
51
52
53
# File 'lib/smart_udap_harmonization_test_kit/smart_udap_context_test.rb', line 49

def missing_received_scopes_string
  missing_received_context_scopes
    .map { |scope| "`#{scope}`" }
    .join(', ')
end

#missing_requested_context_scopesObject



25
26
27
28
# File 'lib/smart_udap_harmonization_test_kit/smart_udap_context_test.rb', line 25

def missing_requested_context_scopes
  @missing_requested_context_scopes ||=
    context_scopes.reject { |scope| requested_scopes_list.include? scope }
end

#missing_requested_context_scopes?Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/smart_udap_harmonization_test_kit/smart_udap_context_test.rb', line 55

def missing_requested_context_scopes?
  missing_requested_context_scopes.present?
end

#missing_requested_scopes_stringObject



43
44
45
46
47
# File 'lib/smart_udap_harmonization_test_kit/smart_udap_context_test.rb', line 43

def missing_requested_scopes_string
  missing_requested_context_scopes
    .map { |scope| "`#{scope}`" }
    .join(', ')
end

#received_scopesObject



17
18
19
# File 'lib/smart_udap_harmonization_test_kit/smart_udap_context_test.rb', line 17

def received_scopes
  token_response['scope'] || ''
end

#received_scopes_listObject



35
36
37
# File 'lib/smart_udap_harmonization_test_kit/smart_udap_context_test.rb', line 35

def received_scopes_list
  @received_scopes_list ||= received_scopes.split
end

#requested_scopesObject



21
22
23
# File 'lib/smart_udap_harmonization_test_kit/smart_udap_context_test.rb', line 21

def requested_scopes
  udap_auth_code_flow_registration_scope
end

#requested_scopes_listObject



39
40
41
# File 'lib/smart_udap_harmonization_test_kit/smart_udap_context_test.rb', line 39

def requested_scopes_list
  @requested_scopes_list ||= requested_scopes.split
end