spring-cloud / spring-cloud-contract

Support for Consumer Driven Contracts in Spring
https://cloud.spring.io/spring-cloud-contract
Apache License 2.0
719 stars 438 forks source link

Trying to use Bearer Token when connecting to Pactflow Broker #1279

Closed mrc535s closed 4 years ago

mrc535s commented 4 years ago

I am trying to connect to the PactFlow Broker, but I can't seem to find a way to connect using the Bearer token as shown in their documentation. I only see the ability to use username and password, but not sure that it is even possible with Pactflow API as I keep getting a 401. Is this something available already? If so, can someone point me to the documentation on how to do this? If not, is this something we can get added to as a feature?

marcingrzejszczak commented 4 years ago

Are you sure you're asking the question at the proper place? Or are you trying to use Spring Cloud Contract together with Pactflow?

mrc535s commented 4 years ago

I think so, but let me know if not. Essentially I am trying to push the contracts to the pact broker hosted by Pactflow.

Here is the contracts configuration in my build.gradle for my Provider:

contracts {
    // When + is passed, a latest tag will be applied when fetching pacts
    contractDependency {
        stringNotation = "${project.group}:${project.name}:+"
    }
    contractRepository {
        repositoryUrl = "pact://https:username//path.pact.dius.com.au:443/"
        username = "myemail@domain.com"
        password = "mypassword"

    }
    contractsMode = "REMOTE"
    // Base class mappings etc.
}

This returns a 401

marcingrzejszczak commented 4 years ago

The url shouldn't be sth like? repositoryUrl = "pact://https://path.pact.dius.com.au:443/"

spring-projects-issues commented 4 years ago

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-projects-issues commented 4 years ago

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.