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.
diff --git a/googleapiclient/discovery.py b/googleapiclient/discovery.py
index 1004f30..8fc66f2 100644
--- a/googleapiclient/discovery.py
+++ b/googleapiclient/discovery.py
@@ -189,7 +189,7 @@
adc_key_path=None,
num_retries=1,
static_discovery=None,
- always_use_jwt_access=True,
+ always_use_jwt_access=False,
):
"""Construct a Resource for interacting with an API.
@@ -447,7 +447,7 @@
client_options=None,
adc_cert_path=None,
adc_key_path=None,
- always_use_jwt_access=True,
+ always_use_jwt_access=False,
):
"""Create a Resource for interacting with an API.
diff --git a/tests/test_discovery.py b/tests/test_discovery.py
index 9559bf6..bdc180b 100644
--- a/tests/test_discovery.py
+++ b/tests/test_discovery.py
@@ -695,6 +695,7 @@
build_from_document(
discovery,
credentials=creds,
+ always_use_jwt_access=True,
)
_create_self_signed_jwt.assert_called_with("https://logging.googleapis.com/")
@@ -708,7 +709,6 @@
build_from_document(
discovery,
credentials=creds,
- always_use_jwt_access=False,
)
_create_self_signed_jwt.assert_not_called()