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

Commit 102ac0e

Browse files
fix: fix the document of secure_authorized_session
1 parent 05220e0 commit 102ac0e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

google/auth/transport/grpc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def secure_authorized_channel(
148148
regular_ssl_credentials = grpc.ssl_channel_credentials()
149149
150150
channel = google.auth.transport.grpc.secure_authorized_channel(
151-
credentials, regular_endpoint, request,
151+
credentials, request, regular_endpoint,
152152
ssl_credentials=regular_ssl_credentials)
153153
154154
Option 2: create a mutual TLS channel by calling a callback which returns
@@ -188,7 +188,7 @@ def my_client_cert_callback():
188188
else:
189189
endpoint_to_use = regular_endpoint
190190
channel = google.auth.transport.grpc.secure_authorized_channel(
191-
credentials, endpoint_to_use, request,
191+
credentials, request, endpoint_to_use,
192192
ssl_credentials=default_ssl_credentials)
193193
194194
Option 4: not setting ssl_credentials and client_cert_callback. For devices
@@ -202,14 +202,14 @@ def my_client_cert_callback():
202202
certificate and key::
203203
204204
channel = google.auth.transport.grpc.secure_authorized_channel(
205-
credentials, regular_endpoint, request)
205+
credentials, request, regular_endpoint)
206206
207207
The following code uses mtls_endpoint, if the created channle is regular,
208208
and API mtls_endpoint is confgured to require client SSL credentials, API
209209
calls using this channel will be rejected::
210210
211211
channel = google.auth.transport.grpc.secure_authorized_channel(
212-
credentials, mtls_endpoint, request)
212+
credentials, request, mtls_endpoint)
213213
214214
Args:
215215
credentials (google.auth.credentials.Credentials): The credentials to

0 commit comments

Comments
 (0)