aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/google-auth/py3/google/auth/external_account.py
diff options
context:
space:
mode:
authorAlexSm <alex@ydb.tech>2023-12-27 23:31:58 +0100
committerGitHub <noreply@github.com>2023-12-27 23:31:58 +0100
commitd67bfb4b4b7549081543e87a31bc6cb5c46ac973 (patch)
tree8674f2f1570877cb653e7ddcff37ba00288de15a /contrib/python/google-auth/py3/google/auth/external_account.py
parent1f6bef05ed441c3aa2d565ac792b26cded704ac7 (diff)
downloadydb-d67bfb4b4b7549081543e87a31bc6cb5c46ac973.tar.gz
Import libs 4 (#758)
Diffstat (limited to 'contrib/python/google-auth/py3/google/auth/external_account.py')
-rw-r--r--contrib/python/google-auth/py3/google/auth/external_account.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/contrib/python/google-auth/py3/google/auth/external_account.py b/contrib/python/google-auth/py3/google/auth/external_account.py
index c45e6f2133..e7fed8695a 100644
--- a/contrib/python/google-auth/py3/google/auth/external_account.py
+++ b/contrib/python/google-auth/py3/google/auth/external_account.py
@@ -132,7 +132,10 @@ class Credentials(
self._default_scopes = default_scopes
self._workforce_pool_user_project = workforce_pool_user_project
self._universe_domain = universe_domain or _DEFAULT_UNIVERSE_DOMAIN
- self._trust_boundary = "0" # expose a placeholder trust boundary value.
+ self._trust_boundary = {
+ "locations": [],
+ "encoded_locations": "0x0",
+ } # expose a placeholder trust boundary value.
if self._client_id:
self._client_auth = utils.ClientAuthentication(
@@ -412,6 +415,22 @@ class Credentials(
new_cred._metrics_options = self._metrics_options
return new_cred
+ def with_universe_domain(self, universe_domain):
+ """Create a copy of these credentials with the given universe domain.
+
+ Args:
+ universe_domain (str): The universe domain value.
+
+ Returns:
+ google.auth.external_account.Credentials: A new credentials
+ instance.
+ """
+ kwargs = self._constructor_args()
+ kwargs.update(universe_domain=universe_domain)
+ new_cred = self.__class__(**kwargs)
+ new_cred._metrics_options = self._metrics_options
+ return new_cred
+
def _initialize_impersonated_credentials(self):
"""Generates an impersonated credentials.