34 #ifndef GRPCXX_CREDENTIALS_H
35 #define GRPCXX_CREDENTIALS_H
47 class ChannelArguments;
49 class SecureChannelCredentials;
50 class CallCredentials;
51 class SecureCallCredentials;
65 const std::shared_ptr<ChannelCredentials>& channel_creds,
66 const std::shared_ptr<CallCredentials>& call_creds);
73 const std::shared_ptr<ChannelCredentials>& creds,
76 virtual std::shared_ptr<Channel> CreateChannel(
93 const std::shared_ptr<ChannelCredentials>& channel_creds,
94 const std::shared_ptr<CallCredentials>& call_creds);
97 const std::shared_ptr<CallCredentials>& creds1,
98 const std::shared_ptr<CallCredentials>& creds2);
153 const grpc::string& json_key,
long token_lifetime_seconds);
190 const std::shared_ptr<ChannelCredentials>& channel_creds,
191 const std::shared_ptr<CallCredentials>& call_creds);
195 const std::shared_ptr<CallCredentials>& creds1,
196 const std::shared_ptr<CallCredentials>& creds2);
211 virtual const char*
GetType()
const {
return ""; }
221 std::multimap<grpc::string, grpc::string>* metadata) = 0;
225 std::unique_ptr<MetadataCredentialsPlugin> plugin);
229 #endif // GRPCXX_CREDENTIALS_H
std::shared_ptr< ChannelCredentials > InsecureChannelCredentials()
Credentials for an unencrypted, unauthenticated channel.
std::string string
Definition: config.h:112
virtual SecureChannelCredentials * AsSecureCredentials()=0
std::shared_ptr< ChannelCredentials > 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.
Options for channel creation.
Definition: channel_arguments.h:52
Class encapsulating the Authentication Information.
Definition: auth_context.h:80
std::shared_ptr< CallCredentials > GoogleComputeEngineCredentials()
Builds credentials for use when running in GCE.
std::shared_ptr< CallCredentials > CompositeCallCredentials(const std::shared_ptr< CallCredentials > &creds1, const std::shared_ptr< CallCredentials > &creds2)
Combines two call credentials objects into a composite call credentials.
virtual SecureCallCredentials * AsSecureCredentials()=0
std::shared_ptr< CallCredentials > GoogleRefreshTokenCredentials(const grpc::string &json_refresh_token)
Builds refresh token credentials.
friend std::shared_ptr< Channel > CreateCustomChannel(const grpc::string &target, const std::shared_ptr< ChannelCredentials > &creds, const ChannelArguments &args)
Create a new custom Channel pointing to target.
friend std::shared_ptr< ChannelCredentials > 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.
std::shared_ptr< ChannelCredentials > SslCredentials(const SslCredentialsOptions &options)
Builds SSL Credentials given SSL specific options.
friend std::shared_ptr< CallCredentials > CompositeCallCredentials(const std::shared_ptr< CallCredentials > &creds1, const std::shared_ptr< CallCredentials > &creds2)
Combines two call credentials objects into a composite call credentials.
grpc::string pem_root_certs
The buffer containing the PEM encoding of the server root certificates.
Definition: credentials.h:110
Options used to build SslCredentials.
Definition: credentials.h:104
~CallCredentials() GRPC_OVERRIDE
Definition: grpc_library.h:41
grpc::string pem_cert_chain
The buffer containing the PEM encoding of the client's certificate chain.
Definition: credentials.h:119
friend std::shared_ptr< ChannelCredentials > 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.
grpc::string pem_private_key
The buffer containing the PEM encoding of the client's private key.
Definition: credentials.h:114
virtual bool ApplyToCall(grpc_call *call)=0
Apply this instance's credentials to call.
This class is a non owning reference to a string.
Definition: string_ref.h:52
std::shared_ptr< CallCredentials > ServiceAccountJWTAccessCredentials(const grpc::string &json_key, long token_lifetime_seconds)
Builds Service Account JWT Access credentials.
A channel credentials object encapsulates all the state needed by a client to authenticate with a ser...
Definition: credentials.h:59
Did it work? If it didn't, why?
Definition: status.h:45
std::shared_ptr< CallCredentials > GoogleIAMCredentials(const grpc::string &authorization_token, const grpc::string &authority_selector)
Builds IAM credentials.
A call credentials object encapsulates the state needed by a client to authenticate with a server for...
Definition: credentials.h:84
std::shared_ptr< ChannelCredentials > GoogleDefaultCredentials()
Builds credentials with reasonable defaults.
std::shared_ptr< CallCredentials > MetadataCredentialsFromPlugin(std::unique_ptr< MetadataCredentialsPlugin > plugin)
~ChannelCredentials() GRPC_OVERRIDE
#define GRPC_OVERRIDE
Definition: config.h:77
std::shared_ptr< CallCredentials > AccessTokenCredentials(const grpc::string &access_token)
Builds access token credentials.