Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add authentication token during pact-verification process when getting contract file in clojure #1731

Open
prabhleen18 opened this issue Nov 23, 2023 · 1 comment
Labels
question Indicates that an issue, pull request, or discussion needs more information

Comments

@prabhleen18
Copy link

prabhleen18 commented Nov 23, 2023

I am trying to get the contract file in order to verify pact with the provider in clojure. Since we are using pactflow we need to authenticate with the bearer token. We are doing the following but it is not working.:

:consumerA{
:pact-source "https://company.pactflow.io/pacts/provider/providerA/consumer/consumerA/latest"
:auth {:token "auth-token"}
}

We are getting the following error :
Error encountered performing task 'pact-verify' with profile(s): 'pact'
InvalidHttpResponseException(message=Request to source 'UrlSource(url=https://company.pactflow.io/pacts/provider/providerA/consumer/consumerA/latest, pact=null)' failed with response 'HTTP/1.1 401 Unauthorized')

Version used: au.com.dius.pact.provider/lein "4.1.42"
Can you please support here

@rholshausen rholshausen added the question Indicates that an issue, pull request, or discussion needs more information label Dec 5, 2023
@rholshausen
Copy link
Contributor

Just confirming, "auth-token" is replaced with your actual auth token?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Indicates that an issue, pull request, or discussion needs more information
Projects
None yet
Development

No branches or pull requests

2 participants