GRPC C++  1.66.0
Data Structures | Namespaces | Functions | Variables
credentials.h File Reference
#include <map>
#include <memory>
#include <vector>
#include <grpc/grpc_security_constants.h>
#include <grpcpp/channel.h>
#include <grpcpp/impl/grpc_library.h>
#include <grpcpp/security/auth_context.h>
#include <grpcpp/security/tls_credentials_options.h>
#include <grpcpp/support/channel_arguments.h>
#include <grpcpp/support/client_interceptor.h>
#include <grpcpp/support/status.h>
#include <grpcpp/support/string_ref.h>

Go to the source code of this file.

Data Structures

class  grpc::ChannelCredentials
 A channel credentials object encapsulates all the state needed by a client to authenticate with a server for a given channel. More...
 
class  grpc::CallCredentials
 A call credentials object encapsulates the state needed by a client to authenticate with a server for a given call on a channel. More...
 
struct  grpc::SslCredentialsOptions
 Options used to build SslCredentials. More...
 
class  grpc::MetadataCredentialsPlugin
 User defined metadata credentials. More...
 
struct  grpc::experimental::StsCredentialsOptions
 Options for creating STS Oauth Token Exchange credentials following the IETF draft https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16. More...
 
struct  grpc::experimental::AltsCredentialsOptions
 Options used to build AltsCredentials. More...
 

Namespaces

 grpc
 An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided function on expiry or cancellation.
 
 grpc::testing
 
 grpc::experimental
 ClientRpcInfo represents the state of a particular RPC as it appears to an interceptor.
 

Functions

std::string grpc::testing::GetOauth2AccessToken ()
 
std::shared_ptr< Channel > grpc::CreateCustomChannel (const grpc::string &target, const std::shared_ptr< grpc::ChannelCredentials > &creds, const grpc::ChannelArguments &args)
 
std::shared_ptr< grpc::Channelgrpc::experimental::CreateCustomChannelWithInterceptors (const grpc::string &target, const std::shared_ptr< grpc::ChannelCredentials > &creds, const grpc::ChannelArguments &args, std::vector< std::unique_ptr< grpc::experimental::ClientInterceptorFactoryInterface >> interceptor_creators)
 
std::shared_ptr< ChannelCredentials > grpc::XdsCredentials (const std::shared_ptr< ChannelCredentials > &fallback_creds)
 Builds XDS Credentials. More...
 
std::shared_ptr< ChannelCredentials > grpc::GoogleDefaultCredentials ()
 Builds credentials with reasonable defaults. More...
 
std::shared_ptr< ChannelCredentials > grpc::SslCredentials (const SslCredentialsOptions &options)
 Builds SSL Credentials given SSL specific options. More...
 
std::shared_ptr< CallCredentials > grpc::GoogleComputeEngineCredentials ()
 Builds credentials for use when running in GCE. More...
 
std::shared_ptr< CallCredentials > grpc::ServiceAccountJWTAccessCredentials (const grpc::string &json_key, long token_lifetime_seconds=kMaxAuthTokenLifetimeSecs)
 Builds Service Account JWT Access credentials. More...
 
std::shared_ptr< CallCredentials > grpc::GoogleRefreshTokenCredentials (const grpc::string &json_refresh_token)
 Builds refresh token credentials. More...
 
std::shared_ptr< CallCredentials > grpc::AccessTokenCredentials (const grpc::string &access_token)
 Builds access token credentials. More...
 
std::shared_ptr< CallCredentials > grpc::GoogleIAMCredentials (const grpc::string &authorization_token, const grpc::string &authority_selector)
 Builds IAM credentials. More...
 
std::shared_ptr< ChannelCredentials > grpc::CompositeChannelCredentials (const std::shared_ptr< ChannelCredentials > &channel_creds, const std::shared_ptr< CallCredentials > &call_creds)
 Combines a channel credentials and a call credentials into a composite channel credentials. More...
 
std::shared_ptr< CallCredentials > grpc::CompositeCallCredentials (const std::shared_ptr< CallCredentials > &creds1, const std::shared_ptr< CallCredentials > &creds2)
 Combines two call credentials objects into a composite call credentials. More...
 
std::shared_ptr< ChannelCredentials > grpc::InsecureChannelCredentials ()
 Credentials for an unencrypted, unauthenticated channel. More...
 
std::shared_ptr< CallCredentials > grpc::MetadataCredentialsFromPlugin (std::unique_ptr< MetadataCredentialsPlugin > plugin)
 
std::shared_ptr< CallCredentials > grpc::ExternalAccountCredentials (const grpc::string &json_string, const std::vector< grpc::string > &scopes)
 Builds External Account credentials. More...
 
grpc::Status grpc::experimental::StsCredentialsOptionsFromJson (const std::string &json_string, StsCredentialsOptions *options)
 
grpc::Status grpc::experimental::StsCredentialsOptionsFromEnv (StsCredentialsOptions *options)
 Creates STS credentials options from the $STS_CREDENTIALS environment variable. More...
 
std::shared_ptr< CallCredentials > grpc::experimental::StsCredentials (const StsCredentialsOptions &options)
 
std::shared_ptr< CallCredentials > grpc::experimental::MetadataCredentialsFromPlugin (std::unique_ptr< MetadataCredentialsPlugin > plugin, grpc_security_level min_security_level)
 
std::shared_ptr< ChannelCredentials > grpc::experimental::AltsCredentials (const AltsCredentialsOptions &options)
 Builds ALTS Credentials given ALTS specific options. More...
 
std::shared_ptr< ChannelCredentials > grpc::experimental::LocalCredentials (grpc_local_connect_type type)
 Builds Local Credentials. More...
 
std::shared_ptr< ChannelCredentials > grpc::experimental::TlsCredentials (const TlsChannelCredentialsOptions &options)
 Builds TLS Credentials given TLS options. More...
 

Variables

constexpr long grpc::kMaxAuthTokenLifetimeSecs = 3600