How to set up authentication on @AutoConfigureStubRunner?

30 views Asked by At

How to set up authentication on the @AutoConfigureStubRunner annotation in Spring Cloud Contract?

@AutoConfigureStubRunner(
    stubsMode = REMOTE,
    ids = ["some-stub-id"],
    repositoryRoot = "https://jfrog.myrepo.com/artifactory/public-maven"
)

Is there any way to pass on the username/password?

1

There are 1 answers

0
Lukasz G. On BEST ANSWER

Turns out the username and password can be set in the application.properties file like this:

stubrunner.username=<username>
stubrunner.password=<password>