Skip to content

Commit

Permalink
fix: fix the document of secure_authorized_session
Browse files Browse the repository at this point in the history
  • Loading branch information
arithmetic1728 authored Jun 13, 2024
1 parent 05220e0 commit 102ac0e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions google/auth/transport/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def secure_authorized_channel(
regular_ssl_credentials = grpc.ssl_channel_credentials()
channel = google.auth.transport.grpc.secure_authorized_channel(
credentials, regular_endpoint, request,
credentials, request, regular_endpoint,
ssl_credentials=regular_ssl_credentials)
Option 2: create a mutual TLS channel by calling a callback which returns
Expand Down Expand Up @@ -188,7 +188,7 @@ def my_client_cert_callback():
else:
endpoint_to_use = regular_endpoint
channel = google.auth.transport.grpc.secure_authorized_channel(
credentials, endpoint_to_use, request,
credentials, request, endpoint_to_use,
ssl_credentials=default_ssl_credentials)
Option 4: not setting ssl_credentials and client_cert_callback. For devices
Expand All @@ -202,14 +202,14 @@ def my_client_cert_callback():
certificate and key::
channel = google.auth.transport.grpc.secure_authorized_channel(
credentials, regular_endpoint, request)
credentials, request, regular_endpoint)
The following code uses mtls_endpoint, if the created channle is regular,
and API mtls_endpoint is confgured to require client SSL credentials, API
calls using this channel will be rejected::
channel = google.auth.transport.grpc.secure_authorized_channel(
credentials, mtls_endpoint, request)
credentials, request, mtls_endpoint)
Args:
credentials (google.auth.credentials.Credentials): The credentials to
Expand Down

0 comments on commit 102ac0e

Please sign in to comment.