Skip to content

Commit

Permalink
chore: support basic auth in test data builder
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Sep 27, 2021
1 parent 8847e44 commit d3bb028
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/pact_broker/test/http_test_data_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def initialize(pact_broker_base_url, auth = {})
logger.filter(/(Authorization: ).*/,'\1[REMOVED]')
end
end
faraday.basic_auth(auth[:username], auth[:password]) if auth[:username]
faraday.headers["Authorization"] = "Bearer #{auth[:token]}" if auth[:token]
faraday.adapter Faraday.default_adapter
end
Expand Down

0 comments on commit d3bb028

Please sign in to comment.