Search code examples
javapact

Does JVM @PactUrl provide basic auth options?


I want to consumer a pact contract file from a url with basic auth. Does JVM @PactUrl provide basic auth options? If not, is there a way to provide it somewhere else when using "@pacturl"?


Solution

  • If you're only using basic auth, couldn't you use the URL in @PactUrl to have the username/password?

    Like this https://foo:password@example.com?

    That being said, I think it would be good to have a way to authenticate for all pacts so that the username/password doesn't have to be repeated over and over throughout the codebase.