Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit 39eb600

Browse files
authored
Merge branch 'main' into metadata-retry-error-handling-6226991344715693997
2 parents bbfe615 + 5d00147 commit 39eb600

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

google/auth/transport/grpc.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def secure_authorized_channel(
146146
regular_ssl_credentials = grpc.ssl_channel_credentials()
147147
148148
channel = google.auth.transport.grpc.secure_authorized_channel(
149-
credentials, regular_endpoint, request,
149+
credentials, request, regular_endpoint,
150150
ssl_credentials=regular_ssl_credentials)
151151
152152
Option 2: create a mutual TLS channel by calling a callback which returns
@@ -162,7 +162,7 @@ def my_client_cert_callback():
162162
163163
try:
164164
channel = google.auth.transport.grpc.secure_authorized_channel(
165-
credentials, mtls_endpoint, request,
165+
credentials, request, mtls_endpoint,
166166
client_cert_callback=my_client_cert_callback)
167167
except MyClientCertFailureException:
168168
# handle the exception
@@ -186,7 +186,7 @@ def my_client_cert_callback():
186186
else:
187187
endpoint_to_use = regular_endpoint
188188
channel = google.auth.transport.grpc.secure_authorized_channel(
189-
credentials, endpoint_to_use, request,
189+
credentials, request, endpoint_to_use,
190190
ssl_credentials=default_ssl_credentials)
191191
192192
Option 4: not setting ssl_credentials and client_cert_callback. For devices
@@ -200,14 +200,14 @@ def my_client_cert_callback():
200200
certificate and key::
201201
202202
channel = google.auth.transport.grpc.secure_authorized_channel(
203-
credentials, regular_endpoint, request)
203+
credentials, request, regular_endpoint)
204204
205205
The following code uses mtls_endpoint, if the created channle is regular,
206206
and API mtls_endpoint is confgured to require client SSL credentials, API
207207
calls using this channel will be rejected::
208208
209209
channel = google.auth.transport.grpc.secure_authorized_channel(
210-
credentials, mtls_endpoint, request)
210+
credentials, request, mtls_endpoint)
211211
212212
Args:
213213
credentials (google.auth.credentials.Credentials): The credentials to

google/auth/transport/urllib3.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,8 @@ class Request(transport.Request):
106106
credentials.refresh(request)
107107
108108
Args:
109-
http (urllib3.request.RequestMethods): An instance of any urllib3
110-
class that implements :class:`~urllib3.request.RequestMethods`,
111-
usually :class:`urllib3.PoolManager`.
109+
http (urllib3.PoolManager): An instance of a urllib3 class that implements
110+
the request interface (e.g. :class:`urllib3.PoolManager`).
112111
113112
.. automethod:: __call__
114113
"""
@@ -209,7 +208,7 @@ class AuthorizedHttp(RequestMethods): # type: ignore
209208
response = authed_http.request(
210209
'GET', 'https://www.googleapis.com/storage/v1/b')
211210
212-
This class implements :class:`urllib3.request.RequestMethods` and can be
211+
This class implements the urllib3 request interface and can be
213212
used just like any other :class:`urllib3.PoolManager`.
214213
215214
The underlying :meth:`urlopen` implementation handles adding the

0 commit comments

Comments
 (0)