Skip to content
Open
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
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