Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions google/auth/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import abc
from enum import Enum
import os
from typing import List

from google.auth import _helpers, environment_vars
from google.auth import exceptions
Expand All @@ -27,7 +28,7 @@
from google.auth._refresh_worker import RefreshThreadManager

DEFAULT_UNIVERSE_DOMAIN = "googleapis.com"
NO_OP_TRUST_BOUNDARY_LOCATIONS: list[str] = []
NO_OP_TRUST_BOUNDARY_LOCATIONS: List[str] = []
NO_OP_TRUST_BOUNDARY_ENCODED_LOCATIONS = "0x0"


Expand Down Expand Up @@ -434,13 +435,12 @@ def _build_trust_boundary_lookup_url(self):
def _has_no_op_trust_boundary(self):
# A no-op trust boundary is indicated by encodedLocations being "0x0".
# The "locations" list may or may not be present as an empty list.
if (
self._trust_boundary is not None
and self._trust_boundary["encodedLocations"]
if self._trust_boundary is None:
return False
return (
self._trust_boundary.get("encodedLocations")
== NO_OP_TRUST_BOUNDARY_ENCODED_LOCATIONS
):
return True
return False
)


class AnonymousCredentials(Credentials):
Expand Down