Class: SMARTAppLaunch::TokenExchangeTest

Inherits:
Inferno::Test
  • Object
show all
Defined in:
lib/smart_app_launch/token_exchange_test.rb

Direct Known Subclasses

TokenExchangeSTU2Test

Instance Method Summary collapse

Instance Method Details

#add_credentials_to_request(oauth2_params, oauth2_headers) ⇒ Object



41
42
43
44
45
46
47
48
# File 'lib/smart_app_launch/token_exchange_test.rb', line 41

def add_credentials_to_request(oauth2_params, oauth2_headers)
  if client_secret.present?
    client_credentials = "#{client_id}:#{client_secret}"
    oauth2_headers['Authorization'] = "Basic #{Base64.strict_encode64(client_credentials)}"
  else
    oauth2_params[:client_id] = client_id
  end
end