Class: DaVinciDTRTestKit::MockUdapSmartServer::TokenEndpoint

Inherits:
Inferno::DSL::SuiteEndpoint
  • Object
show all
Includes:
SMARTAppLaunch::MockSMARTServer::SMARTTokenResponseCreation, UDAPSecurityTestKit::MockUDAPServer::UDAPTokenResponseCreation
Defined in:
lib/davinci_dtr_test_kit/endpoints/mock_udap_smart_server/token_endpoint.rb

Instance Method Summary collapse

Instance Method Details

#make_responseObject



18
19
20
21
22
23
24
# File 'lib/davinci_dtr_test_kit/endpoints/mock_udap_smart_server/token_endpoint.rb', line 18

def make_response
  if request.params[:udap].present?
    make_udap_client_credential_token_response
  else
    make_smart_client_credential_token_response
  end
end

#tagsObject



30
31
32
33
# File 'lib/davinci_dtr_test_kit/endpoints/mock_udap_smart_server/token_endpoint.rb', line 30

def tags
  type_tag = request.params[:udap].present? ? UDAPSecurityTestKit::UDAP_TAG : SMARTAppLaunch::SMART_TAG
  [UDAPSecurityTestKit::TOKEN_TAG, UDAPSecurityTestKit::CLIENT_CREDENTIALS_TAG, type_tag]
end

#test_run_identifierObject



14
15
16
# File 'lib/davinci_dtr_test_kit/endpoints/mock_udap_smart_server/token_endpoint.rb', line 14

def test_run_identifier
  UDAPSecurityTestKit::MockUDAPServer.client_id_from_client_assertion(request.params[:client_assertion])
end

#update_resultObject



26
27
28
# File 'lib/davinci_dtr_test_kit/endpoints/mock_udap_smart_server/token_endpoint.rb', line 26

def update_result
  nil # never update for now
end