class SMARTAppLaunch::TokenExchangeSTU2Test

def add_credentials_to_request(oauth2_params, oauth2_headers)

def add_credentials_to_request(oauth2_params, oauth2_headers)
  if smart_auth_info.asymmetric_auth?
    oauth2_params.merge!(
      client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer',
      client_assertion: ClientAssertionBuilder.build(
        iss: smart_auth_info.client_id,
        sub: smart_auth_info.client_id,
        aud: smart_auth_info.token_url,
        client_auth_encryption_method: smart_auth_info.encryption_algorithm,
        custom_jwks: smart_auth_info.jwks
      )
    )
  else
    super
  end
end