Class: DaVinciPDexTestKit::PDexPayerClient::MockUdapSmartServer::AuthorizationEndpoint

Inherits:
Inferno::DSL::SuiteEndpoint
  • Object
show all
Includes:
PDexClientOptions, SMARTAppLaunch::MockSMARTServer::SMARTAuthorizationResponseCreation, UDAPSecurityTestKit::MockUDAPServer::UDAPAuthorizationResponseCreation
Defined in:
lib/davinci_pdex_test_kit/pdex_payer_client/mock_udap_smart_server/authorization_endpoint.rb

Constant Summary

Constants included from PDexClientOptions

PDexClientOptions::SMART_APP_LAUNCH_CONFIDENTIAL_ASYMMETRIC, PDexClientOptions::SMART_APP_LAUNCH_CONFIDENTIAL_SYMMETRIC, PDexClientOptions::SMART_APP_LAUNCH_PUBLIC, PDexClientOptions::UDAP_AUTHORIZATION_CODE

Instance Method Summary collapse

Methods included from PDexClientOptions

#selected_security_ig

Instance Method Details

#make_responseObject



27
28
29
30
31
32
33
# File 'lib/davinci_pdex_test_kit/pdex_payer_client/mock_udap_smart_server/authorization_endpoint.rb', line 27

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



21
22
23
24
25
# File 'lib/davinci_pdex_test_kit/pdex_payer_client/mock_udap_smart_server/authorization_endpoint.rb', line 21

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



39
40
41
42
43
44
45
46
47
48
49
# File 'lib/davinci_pdex_test_kit/pdex_payer_client/mock_udap_smart_server/authorization_endpoint.rb', line 39

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



17
18
19
# File 'lib/davinci_pdex_test_kit/pdex_payer_client/mock_udap_smart_server/authorization_endpoint.rb', line 17

def test_run_identifier
  request.params[:client_id]
end

#update_resultObject



35
36
37
# File 'lib/davinci_pdex_test_kit/pdex_payer_client/mock_udap_smart_server/authorization_endpoint.rb', line 35

def update_result
  nil # never update for now
end