Go to the documentation of this file.
19 #ifndef GRPCPP_SECURITY_SERVER_CREDENTIALS_H
20 #define GRPCPP_SECURITY_SERVER_CREDENTIALS_H
36 class ServerCredentials;
66 const std::shared_ptr<ServerCredentials>& fallback_credentials);
76 const std::shared_ptr<grpc::AuthMetadataProcessor>& processor);
89 const std::shared_ptr<ServerCredentials>& fallback_credentials);
96 virtual int AddPortToServer(
const std::string& addr,
grpc_server* server);
107 namespace experimental {
129 #endif // GRPCPP_SECURITY_SERVER_CREDENTIALS_H
std::shared_ptr< ServerCredentials > InsecureServerCredentials()
grpc_server_credentials * c_creds() const
Definition: server_credentials.h:81
std::shared_ptr< ServerCredentials > SslServerCredentials(const grpc::SslServerCredentialsOptions &options)
Builds SSL ServerCredentials given SSL specific options.
Definition: server_credentials.h:48
Represents a gRPC server.
Definition: server.h:57
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm.h:33
bool force_client_auth
Definition: server_credentials.h:55
Wrapper around grpc_server_credentials, a way to authenticate a server.
Definition: server_credentials.h:69
std::shared_ptr< ServerCredentials > AltsServerCredentials(const AltsServerCredentialsOptions &options)
Builds ALTS ServerCredentials given ALTS specific options.
std::shared_ptr< ServerCredentials > XdsServerCredentials(const std::shared_ptr< ServerCredentials > &fallback_credentials)
Builds Xds ServerCredentials given fallback credentials.
std::string private_key
Definition: server_credentials.h:49
std::shared_ptr< ServerCredentials > LocalServerCredentials(grpc_local_connect_type type)
Builds Local ServerCredentials.
struct grpc_server grpc_server
A server listens to some port and responds to request calls.
Definition: grpc_types.h:64
grpc_ssl_client_certificate_request_type
Definition: grpc_security_constants.h:79
SslServerCredentialsOptions()
Definition: server_credentials.h:41
Options to create ServerCredentials with SSL.
Definition: server_credentials.h:39
std::string cert_chain
Definition: server_credentials.h:50
SslServerCredentialsOptions(grpc_ssl_client_certificate_request_type request_type)
Definition: server_credentials.h:44
virtual void SetAuthMetadataProcessor(const std::shared_ptr< grpc::AuthMetadataProcessor > &processor)
This method is not thread-safe and has to be called before the server is started.
Classes that require gRPC to be initialized should inherit from this class.
Definition: grpc_library.h:32
ServerCredentials(grpc_server_credentials *creds)
std::string pem_root_certs
Definition: server_credentials.h:52
Definition: tls_credentials_options.h:166
@ GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE
Server does not request client certificate.
Definition: grpc_security_constants.h:84
std::vector< PemKeyCertPair > pem_key_cert_pairs
Definition: server_credentials.h:53
grpc_ssl_client_certificate_request_type client_certificate_request
If both force_client_auth and client_certificate_request fields are set, force_client_auth takes effe...
Definition: server_credentials.h:61
A builder class for the creation and startup of grpc::Server instances.
Definition: server_builder.h:88
struct grpc_server_credentials grpc_server_credentials
— grpc_server_credentials object.
Definition: grpc.h:299
Options to create ServerCredentials with ALTS.
Definition: server_credentials.h:110
grpc_local_connect_type
Type of local connections for which local channel/server credentials will be applied.
Definition: grpc_security_constants.h:143
~ServerCredentials() override
std::shared_ptr< ServerCredentials > TlsServerCredentials(const experimental::TlsServerCredentialsOptions &options)
Builds TLS ServerCredentials given TLS options.