GRPC C++  1.30.0
server_credentials_impl.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPCPP_SECURITY_SERVER_CREDENTIALS_IMPL_H
20 #define GRPCPP_SECURITY_SERVER_CREDENTIALS_IMPL_H
21 
22 #include <memory>
23 #include <vector>
24 
28 #include <grpcpp/support/config.h>
29 
30 struct grpc_server;
31 
32 namespace grpc {
33 
34 struct SslServerCredentialsOptions;
35 } // namespace grpc
36 namespace grpc_impl {
37 class Server;
38 
41  public:
42  virtual ~ServerCredentials();
43 
46  virtual void SetAuthMetadataProcessor(
47  const std::shared_ptr<grpc::AuthMetadataProcessor>& processor) = 0;
48 
49  private:
51 
56  // TODO(dgq): the "port" part seems to be a misnomer.
57  virtual int AddPortToServer(const grpc::string& addr,
58  grpc_server* server) = 0;
59 };
60 
62 std::shared_ptr<ServerCredentials> SslServerCredentials(
63  const grpc::SslServerCredentialsOptions& options);
64 
66 std::shared_ptr<ServerCredentials> InsecureServerCredentials();
67 
68 namespace experimental {
69 
73 };
74 
76 std::shared_ptr<ServerCredentials> AltsServerCredentials(
77  const AltsServerCredentialsOptions& options);
78 
80 std::shared_ptr<ServerCredentials> LocalServerCredentials(
82 
84 std::shared_ptr<ServerCredentials> TlsServerCredentials(
85  const TlsCredentialsOptions& options);
86 
87 } // namespace experimental
88 } // namespace grpc_impl
89 
90 #endif // GRPCPP_SECURITY_SERVER_CREDENTIALS_IMPL_H
tls_credentials_options.h
grpc
This header provides an object that reads bytes directly from a grpc::ByteBuffer, via the ZeroCopyInp...
Definition: alarm.h:24
grpc_impl::InsecureServerCredentials
std::shared_ptr< ServerCredentials > InsecureServerCredentials()
Builds insecure server credentials.
grpc_impl::experimental::TlsServerCredentials
std::shared_ptr< ServerCredentials > TlsServerCredentials(const TlsCredentialsOptions &options)
Builds TLS ServerCredentials given TLS options.
grpc_impl::ServerCredentials::~ServerCredentials
virtual ~ServerCredentials()
grpc::Server
::grpc_impl::Server Server
Definition: server.h:26
grpc_impl::experimental::AltsServerCredentialsOptions
Options to create ServerCredentials with ALTS.
Definition: server_credentials_impl.h:71
grpc_impl::experimental::TlsCredentialsOptions
TLS credentials options, wrapper for grpc_tls_credentials_options.
Definition: tls_credentials_options.h:279
auth_metadata_processor.h
grpc_server
struct grpc_server grpc_server
A server listens to some port and responds to request calls.
Definition: grpc_types.h:65
grpc_impl::ServerCredentials::SetAuthMetadataProcessor
virtual void SetAuthMetadataProcessor(const std::shared_ptr< grpc::AuthMetadataProcessor > &processor)=0
This method is not thread-safe and has to be called before the server is started.
grpc::SslServerCredentialsOptions
Options to create ServerCredentials with SSL.
Definition: server_credentials.h:33
grpc_impl::ServerCredentials
Wrapper around grpc_server_credentials, a way to authenticate a server.
Definition: server_credentials_impl.h:40
grpc_impl::SslServerCredentials
std::shared_ptr< ServerCredentials > SslServerCredentials(const grpc::SslServerCredentialsOptions &options)
Builds SSL ServerCredentials given SSL specific options.
config.h
grpc_impl::experimental::AltsServerCredentials
std::shared_ptr< ServerCredentials > AltsServerCredentials(const AltsServerCredentialsOptions &options)
Builds ALTS ServerCredentials given ALTS specific options.
grpc_security_constants.h
grpc::string
std::string string
Definition: config.h:35
grpc_impl
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm_impl.h:33
grpc_impl::experimental::LocalServerCredentials
std::shared_ptr< ServerCredentials > LocalServerCredentials(grpc_local_connect_type type)
Builds Local ServerCredentials.
grpc_local_connect_type
grpc_local_connect_type
Type of local connections for which local channel/server credentials will be applied.
Definition: grpc_security_constants.h:140