Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit 5d00147

Browse filesBrowse files
fix: fix the document of secure_authorized_session (#1536)
Co-authored-by: Chalmer Lowe <chalmerlowe@google.com>
1 parent 3f1aeea commit 5d00147
Copy full SHA for 5d00147

1 file changed

+5-5Lines changed: 5 additions & 5 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎google/auth/transport/grpc.py‎

Copy file name to clipboardExpand all lines: google/auth/transport/grpc.py
+5-5Lines 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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.