34 #ifndef GRPCXX_SUPPORT_AUTH_CONTEXT_H
35 #define GRPCXX_SUPPORT_AUTH_CONTEXT_H
40 #include <grpc/grpc_security.h>
44 struct grpc_auth_context;
45 struct grpc_auth_property;
46 struct grpc_auth_property_iterator;
51 typedef std::pair<grpc::string_ref, grpc::string_ref>
AuthProperty;
54 :
public std::iterator<std::input_iterator_tag, const AuthProperty> {
66 const grpc_auth_property_iterator* iter);
70 const grpc_auth_property* property_;
72 const grpc_auth_context* ctx_;
104 return GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME;
107 return GRPC_SSL_TRANSPORT_SECURITY_TYPE;
120 #endif // GRPCXX_SUPPORT_AUTH_CONTEXT_H
std::pair< grpc::string_ref, grpc::string_ref > AuthProperty
Definition: auth_context.h:49
std::string string
Definition: config.h:112
virtual bool IsPeerAuthenticated() const =0
Returns true if the peer is authenticated.
static string ssl_transport_security_type()
Definition: auth_context.h:106
Class encapsulating the Authentication Information.
Definition: auth_context.h:81
Definition: secure_auth_context.h:43
virtual AuthPropertyIterator end() const =0
virtual bool SetPeerIdentityPropertyName(const grpc::string &name)=0
AuthPropertyIterator()
Definition: auth_property_iterator.cc:40
AuthPropertyIterator & operator++()
Definition: auth_property_iterator.cc:52
virtual AuthPropertyIterator begin() const =0
Iteration over all the properties.
static string x509_cn_property_name()
Definition: auth_context.h:109
static string transport_security_type_property_name()
Definition: auth_context.h:103
bool operator!=(const AuthPropertyIterator &rhs) const
Definition: auth_property_iterator.cc:75
const AuthProperty operator*()
Definition: auth_property_iterator.cc:79
virtual ~AuthContext()
Definition: auth_context.h:83
bool operator==(const AuthPropertyIterator &rhs) const
Definition: auth_property_iterator.cc:67
This class is a non owning reference to a string.
Definition: string_ref.h:52
static string x509_san_property_name()
Definition: auth_context.h:110
virtual std::vector< grpc::string_ref > GetPeerIdentity() const =0
A peer identity.
Definition: auth_context.h:53
~AuthPropertyIterator()
Definition: auth_property_iterator.cc:50
virtual std::vector< grpc::string_ref > FindPropertyValues(const grpc::string &name) const =0
Returns all the property values with the given name.
virtual void AddProperty(const grpc::string &key, const grpc::string_ref &value)=0
virtual grpc::string GetPeerIdentityPropertyName() const =0