Open jigarnprajapati opened 3 years ago
What version of the Pact provider dependency are you using?
Just a thought: You could also try setting the respective System properties to try to achieve your wanted behavior, so
pactbroker.auth.username
andpactbroker.auth.password
FYI: I am no Pact dev or guru, just trying to help
pact-jvm-provider-spring_2.12
is a very old version of Pact-JVM, and it does not support bearer token authentication which is required to access a Pactflow broker.
Can you upgrade to either au.com.dius.pact.provider:spring:4.1.25
or au.com.dius.pact.provider:spring:4.2.10
(JDK 11+) and use a user token instead of username/password?
I'm fairly new to pact and I am trying to validate a pact that was published by the consumer on our pactbroker which is hosted on dius.
I do it with the pact-jvm-provider-spring_2.12, and I was able to successfully validate the pact when I use postman or curl same basic auth cred
However, when I now try to use junit4 i get below error
au.com.dius.pact.pactbroker.RequestFailedException: Request to path '/' failed with response 'HTTP/1.1 401 Unauthorized'"
@PactBroker( host="myorg.pact.dius.com.au", port="443", scheme = "https", authentication = @PactBrokerAuth(username = "foo@bar.com", password = "foobar") )