aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarithmetic1728 <58957152+arithmetic1728@users.noreply.github.com>2021-10-12 13:08:17 -0700
committerGitHub <noreply@github.com>2021-10-12 20:08:17 +0000
commit623a71e73d33b8474eea20e800c01d0f80dc8b81 (patch)
tree052900a8c68df3130bfc5a53de757fb4c78a266d
parent9d1fa4282b544875c4284b6c228fc91eb42bd829 (diff)
downloadgoogle-api-python-client-623a71e73d33b8474eea20e800c01d0f80dc8b81.tar.gz
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.
-rw-r--r--googleapiclient/discovery.py4
-rw-r--r--tests/test_discovery.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/googleapiclient/discovery.py b/googleapiclient/discovery.py
index 1004f3088..8fc66f251 100644
--- a/googleapiclient/discovery.py
+++ b/googleapiclient/discovery.py
@@ -189,7 +189,7 @@ def build(
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 @@ def build_from_document(
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 9559bf681..bdc180bbb 100644
--- a/tests/test_discovery.py
+++ b/tests/test_discovery.py
@@ -695,6 +695,7 @@ class DiscoveryFromDocument(unittest.TestCase):
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 @@ class DiscoveryFromDocument(unittest.TestCase):
build_from_document(
discovery,
credentials=creds,
- always_use_jwt_access=False,
)
_create_self_signed_jwt.assert_not_called()