Skip to content

Commit 3ba51b5

Browse files
committed
Add --broker-token support
1 parent d3a8ba6 commit 3ba51b5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pact/verify.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@
5151
envvar='PACT_BROKER_PASSWORD',
5252
help='Password for Pact Broker basic authentication. Can also be specified'
5353
' via the environment variable PACT_BROKER_PASSWORD')
54+
@click.option(
55+
'token', '--pact-broker-token',
56+
envvar='PACT_BROKER_TOKEN',
57+
help='Bearer token for Pact Broker authentication. Can also be specified'
58+
' via the environment variable PACT_BROKER_TOKEN')
5459
@click.option(
5560
'header', '--custom-provider-header',
5661
envvar='CUSTOM_PROVIDER_HEADER',
@@ -79,7 +84,7 @@
7984
default=False,
8085
help='Toggle verbose logging, defaults to False.')
8186
def main(pacts, base_url, pact_url, pact_urls, states_url,
82-
states_setup_url, username, password, header, timeout,
87+
states_setup_url, username, password, token, header, timeout,
8388
provider_app_version, publish_verification_results, verbose):
8489
"""
8590
Verify one or more contracts against a provider service.
@@ -121,6 +126,7 @@ def main(pacts, base_url, pact_url, pact_urls, states_url,
121126
'--provider-states-setup-url': states_setup_url,
122127
'--broker-username': username,
123128
'--broker-password': password,
129+
'--broker-token': token,
124130
'--custom-provider-header': header,
125131
}
126132
command = [VERIFIER_PATH]

0 commit comments

Comments
 (0)