alts_context.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2019 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_ALTS_CONTEXT_H
20 #define GRPCPP_SECURITY_ALTS_CONTEXT_H
21 
22 #include <map>
23 #include <memory>
24 
27 
29 
30 namespace grpc {
31 namespace experimental {
32 
33 // AltsContext is a wrapper class for grpc_gcp_AltsContext.
34 class AltsContext {
35  public:
37  struct Version {
40  };
43  };
44  explicit AltsContext(const grpc_gcp_AltsContext* ctx);
45  AltsContext& operator=(const AltsContext&) = default;
46  AltsContext(const AltsContext&) = default;
47 
54  const std::map<std::string, std::string>& peer_attributes() const;
55 
56  private:
63  std::map<std::string, std::string> peer_attributes_map_;
64 };
65 
66 } // namespace experimental
67 } // namespace grpc
68 
69 #endif // GRPCPP_SECURITY_ALTS_CONTEXT_H
ctx
Definition: benchmark-async.c:30
grpc::experimental::AltsContext::local_service_account
std::string local_service_account() const
Definition: alts_context.cc:118
grpc
Definition: grpcpp/alarm.h:33
grpc::experimental::AltsContext::peer_service_account_
std::string peer_service_account_
Definition: alts_context.h:59
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
grpc::experimental::AltsContext::RpcProtocolVersions::Version::major_version
int major_version
Definition: alts_context.h:38
grpc::experimental::AltsContext::local_service_account_
std::string local_service_account_
Definition: alts_context.h:60
grpc::experimental::AltsContext::RpcProtocolVersions::max_rpc_version
Version max_rpc_version
Definition: alts_context.h:41
grpc::experimental::AltsContext::AltsContext
AltsContext(const grpc_gcp_AltsContext *ctx)
Definition: alts_context.cc:39
grpc::experimental::AltsContext::RpcProtocolVersions
Definition: alts_context.h:36
GRPC_SECURITY_NONE
@ GRPC_SECURITY_NONE
Definition: grpc_security_constants.h:133
grpc::experimental::AltsContext::peer_attributes_map_
std::map< std::string, std::string > peer_attributes_map_
Definition: alts_context.h:63
grpc::experimental::AltsContext::peer_rpc_versions_
RpcProtocolVersions peer_rpc_versions_
Definition: alts_context.h:62
grpc::experimental::AltsContext
Definition: alts_context.h:34
grpc::experimental::AltsContext::peer_rpc_versions
RpcProtocolVersions peer_rpc_versions() const
Definition: alts_context.cc:126
grpc_gcp_AltsContext
struct grpc_gcp_AltsContext grpc_gcp_AltsContext
Definition: altscontext.upb.h:25
grpc::experimental::AltsContext::RpcProtocolVersions::Version::minor_version
int minor_version
Definition: alts_context.h:39
grpc::experimental::AltsContext::record_protocol
std::string record_protocol() const
Definition: alts_context.cc:112
grpc::experimental::AltsContext::peer_attributes
const std::map< std::string, std::string > & peer_attributes() const
Definition: alts_context.cc:130
grpc::experimental::AltsContext::application_protocol_
std::string application_protocol_
Definition: alts_context.h:57
grpc::experimental::AltsContext::operator=
AltsContext & operator=(const AltsContext &)=default
grpc_security_level
grpc_security_level
Definition: grpc_security_constants.h:131
grpc::experimental::AltsContext::security_level
grpc_security_level security_level() const
Definition: alts_context.cc:122
grpc::experimental::AltsContext::record_protocol_
std::string record_protocol_
Definition: alts_context.h:58
grpc::experimental::AltsContext::application_protocol
std::string application_protocol() const
Definition: alts_context.cc:108
grpc_security_constants.h
grpc::experimental::AltsContext::RpcProtocolVersions::min_rpc_version
Version min_rpc_version
Definition: alts_context.h:42
grpc::experimental::AltsContext::security_level_
grpc_security_level security_level_
Definition: alts_context.h:61
auth_context.h
grpc::experimental::AltsContext::peer_service_account
std::string peer_service_account() const
Definition: alts_context.cc:114
grpc::experimental::AltsContext::RpcProtocolVersions::Version
Definition: alts_context.h:37


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:30