19 #ifndef GRPCPP_SECURITY_CREDENTIALS_H 20 #define GRPCPP_SECURITY_CREDENTIALS_H 32 static inline std::shared_ptr<grpc_impl::ChannelCredentials>
33 GoogleDefaultCredentials() {
34 return ::grpc_impl::GoogleDefaultCredentials();
37 static inline std::shared_ptr<ChannelCredentials> SslCredentials(
38 const SslCredentialsOptions& options) {
39 return ::grpc_impl::SslCredentials(options);
42 static inline std::shared_ptr<grpc_impl::CallCredentials>
43 GoogleComputeEngineCredentials() {
44 return ::grpc_impl::GoogleComputeEngineCredentials();
51 static inline std::shared_ptr<grpc_impl::CallCredentials>
52 ServiceAccountJWTAccessCredentials(
55 return ::grpc_impl::ServiceAccountJWTAccessCredentials(
56 json_key, token_lifetime_seconds);
59 static inline std::shared_ptr<grpc_impl::CallCredentials>
60 GoogleRefreshTokenCredentials(
const grpc::string& json_refresh_token) {
61 return ::grpc_impl::GoogleRefreshTokenCredentials(json_refresh_token);
64 static inline std::shared_ptr<grpc_impl::CallCredentials>
65 AccessTokenCredentials(
const grpc::string& access_token) {
66 return ::grpc_impl::AccessTokenCredentials(access_token);
69 static inline std::shared_ptr<grpc_impl::CallCredentials> GoogleIAMCredentials(
72 return ::grpc_impl::GoogleIAMCredentials(authorization_token,
76 static inline std::shared_ptr<ChannelCredentials> CompositeChannelCredentials(
77 const std::shared_ptr<ChannelCredentials>& channel_creds,
78 const std::shared_ptr<CallCredentials>& call_creds) {
79 return ::grpc_impl::CompositeChannelCredentials(channel_creds, call_creds);
82 static inline std::shared_ptr<grpc_impl::CallCredentials>
83 CompositeCallCredentials(
const std::shared_ptr<CallCredentials>& creds1,
84 const std::shared_ptr<CallCredentials>& creds2) {
85 return ::grpc_impl::CompositeCallCredentials(creds1, creds2);
88 static inline std::shared_ptr<grpc_impl::ChannelCredentials>
89 InsecureChannelCredentials() {
90 return ::grpc_impl::InsecureChannelCredentials();
93 static inline std::shared_ptr<grpc_impl::ChannelCredentials>
94 CronetChannelCredentials(
void* engine) {
95 return ::grpc_impl::CronetChannelCredentials(engine);
100 static inline std::shared_ptr<grpc_impl::CallCredentials>
101 MetadataCredentialsFromPlugin(
102 std::unique_ptr<MetadataCredentialsPlugin> plugin) {
103 return ::grpc_impl::MetadataCredentialsFromPlugin(std::move(plugin));
106 namespace experimental {
111 static inline std::shared_ptr<grpc_impl::ChannelCredentials> AltsCredentials(
113 return ::grpc_impl::experimental::AltsCredentials(options);
116 static inline std::shared_ptr<grpc_impl::ChannelCredentials> LocalCredentials(
118 return ::grpc_impl::experimental::LocalCredentials(type);
124 #endif // GRPCPP_SECURITY_CREDENTIALS_H ::grpc_impl::MetadataCredentialsPlugin MetadataCredentialsPlugin
Definition: credentials.h:98
std::string string
Definition: config.h:35
::grpc_impl::SecureChannelCredentials SecureChannelCredentials
Definition: credentials.h:30
Options used to build AltsCredentials.
Definition: credentials_impl.h:263
::grpc_impl::ChannelCredentials ChannelCredentials
Definition: credentials.h:26
::grpc_impl::experimental::AltsCredentialsOptions AltsCredentialsOptions
Definition: credentials.h:109
This header provides an object that reads bytes directly from a grpc::ByteBuffer, via the ZeroCopyInp...
Definition: alarm.h:24
::grpc_impl::CallCredentials CallCredentials
Definition: credentials.h:27
::grpc_impl::SslCredentialsOptions SslCredentialsOptions
Definition: credentials.h:28
::grpc_impl::SecureCallCredentials SecureCallCredentials
Definition: credentials.h:29
constexpr long kMaxAuthTokenLifetimeSecs
Constant for maximum auth token lifetime.
Definition: credentials.h:48
grpc_local_connect_type
Type of local connections for which local channel/server credentials will be applied.
Definition: grpc_security_constants.h:112