Class: CarinForBlueButtonTestKit::MockUdapSmartServer::AuthorizationEndpoint

Inherits:
Inferno::DSL::SuiteEndpoint
  • Object
show all
Includes:
CarinClientOptions, SMARTAppLaunch::MockSMARTServer::SMARTAuthorizationResponseCreation, UDAPSecurityTestKit::MockUDAPServer::UDAPAuthorizationResponseCreation
Defined in:
lib/carin_for_blue_button_test_kit/client/v2.0.0/endpoints/authorization_endpoint.rb

Constant Summary

Constants included from CarinClientOptions

CarinClientOptions::SMART_APP_LAUNCH_CONFIDENTIAL_ASYMMETRIC, CarinClientOptions::SMART_APP_LAUNCH_CONFIDENTIAL_SYMMETRIC, CarinClientOptions::SMART_APP_LAUNCH_PUBLIC, CarinClientOptions::UDAP_AUTHORIZATION_CODE

Instance Method Summary collapse

Methods included from CarinClientOptions

#selected_security_ig

Instance Method Details

#make_responseObject



26
27
28
29
30
31
32
# File 'lib/carin_for_blue_button_test_kit/client/v2.0.0/endpoints/authorization_endpoint.rb', line 26

def make_response
  if selected_security_ig(suite_options) == UDAPSecurityTestKit::UDAP_TAG
    make_udap_authorization_response
  else
    make_smart_authorization_response
  end
end

#suite_optionsObject



20
21
22
23
24
# File 'lib/carin_for_blue_button_test_kit/client/v2.0.0/endpoints/authorization_endpoint.rb', line 20

def suite_options
  @suite_options ||=
    Inferno::Repositories::TestSessions.new.find(result.test_session_id)
      &.suite_options&.map { |so| [so.id, so.value] }&.to_h
end

#tagsObject



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/carin_for_blue_button_test_kit/client/v2.0.0/endpoints/authorization_endpoint.rb', line 38

def tags
  tags = [UDAPSecurityTestKit::AUTHORIZATION_TAG, UDAPSecurityTestKit::AUTHORIZATION_CODE_TAG]
  tags <<
    if selected_security_ig(suite_options) == UDAPSecurityTestKit::UDAP_TAG
      UDAPSecurityTestKit::UDAP_TAG
    else
      SMARTAppLaunch::SMART_TAG
    end

  tags
end

#test_run_identifierObject



16
17
18
# File 'lib/carin_for_blue_button_test_kit/client/v2.0.0/endpoints/authorization_endpoint.rb', line 16

def test_run_identifier
  request.params[:client_id]
end

#update_resultObject



34
35
36
# File 'lib/carin_for_blue_button_test_kit/client/v2.0.0/endpoints/authorization_endpoint.rb', line 34

def update_result
  nil # never update for now
end