GRPC C++  1.76.0
Data Fields
grpc_google_default_credentials_options Struct Reference

Creates default credentials to connect to a google gRPC service. More...

#include <credentials.h>

Data Fields

bool create_hard_bound_credentials
 
grpc_call_credentialscall_creds_for_alts
 

Detailed Description

Creates default credentials to connect to a google gRPC service.

WARNING: Do NOT use this credentials to connect to a non-google service as this could result in an oauth2 token leak. The security level of the resulting connection is GRPC_PRIVACY_AND_INTEGRITY.

If specified, the supplied call credentials objects will be attached to the returned channel credentials object. The call_credentials objects must remain valid throughout the lifetime of the returned grpc_channel_credentials object. It is expected that each call credentials object was generated according to the Application Default Credentials mechanism and asserts the identity of the default service account of the machine. Supplying any other sort of call credential will result in undefined behavior, up to and including the sudden and unexpected failure of RPCs. It is in the caller's responsibility to ensure that both specified credentials assert the correct identities.

If nullptr is supplied, the returned channel credentials object will use a default call credentials object based on the Application Default Credentials mechanism.

The caller may choose to create the default credential with a secondary alts credentials object to attach to the channel for ALTS connections. If credentials options are specified, it will be used to configure an underlying channel which type is ALTS. If the field create_hard_bound_credentials is true, the call_creds_for_alts field will be ignored.

Field Documentation

◆ call_creds_for_alts

grpc_call_credentials* grpc_google_default_credentials_options::call_creds_for_alts

◆ create_hard_bound_credentials

bool grpc_google_default_credentials_options::create_hard_bound_credentials

The documentation for this struct was generated from the following file: