Skip to content

Commit 623a71e

Browse files
fix: disable self signed jwt (#1566)
disable self signed jwt since apiary clients mixed cloud and non-cloud apis. To enable self signed jwt, users can set `always_use_jwt_access` to True in `build` method.
1 parent 9d1fa42 commit 623a71e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

googleapiclient/discovery.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def build(
189189
adc_key_path=None,
190190
num_retries=1,
191191
static_discovery=None,
192-
always_use_jwt_access=True,
192+
always_use_jwt_access=False,
193193
):
194194
"""Construct a Resource for interacting with an API.
195195
@@ -447,7 +447,7 @@ def build_from_document(
447447
client_options=None,
448448
adc_cert_path=None,
449449
adc_key_path=None,
450-
always_use_jwt_access=True,
450+
always_use_jwt_access=False,
451451
):
452452
"""Create a Resource for interacting with an API.
453453

tests/test_discovery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@ def test_self_signed_jwt_enabled(self):
695695
build_from_document(
696696
discovery,
697697
credentials=creds,
698+
always_use_jwt_access=True,
698699
)
699700
_create_self_signed_jwt.assert_called_with("https://logging.googleapis.com/")
700701

@@ -708,7 +709,6 @@ def test_self_signed_jwt_disabled(self):
708709
build_from_document(
709710
discovery,
710711
credentials=creds,
711-
always_use_jwt_access=False,
712712
)
713713
_create_self_signed_jwt.assert_not_called()
714714

0 commit comments

Comments
 (0)