GRPC C++  1.62.0
auth_metadata_processor.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_AUTH_METADATA_PROCESSOR_H
20 #define GRPCPP_SECURITY_AUTH_METADATA_PROCESSOR_H
21 
22 #include <map>
23 
25 #include <grpcpp/support/status.h>
27 
28 namespace grpc {
29 
36  public:
37  typedef std::multimap<grpc::string_ref, grpc::string_ref> InputMetadata;
38  typedef std::multimap<std::string, std::string> OutputMetadata;
39 
41 
44  virtual bool IsBlocking() const { return true; }
45 
65  virtual grpc::Status Process(const InputMetadata& auth_metadata,
66  grpc::AuthContext* context,
67  OutputMetadata* consumed_auth_metadata,
68  OutputMetadata* response_metadata) = 0;
69 };
70 
71 } // namespace grpc
72 
73 #endif // GRPCPP_SECURITY_AUTH_METADATA_PROCESSOR_H
grpc::AuthMetadataProcessor
Interface allowing custom server-side authorization based on credentials encoded in metadata.
Definition: auth_metadata_processor.h:35
grpc
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm.h:33
grpc::AuthMetadataProcessor::InputMetadata
std::multimap< grpc::string_ref, grpc::string_ref > InputMetadata
Definition: auth_metadata_processor.h:37
status.h
grpc::Status
Did it work? If it didn't, why?
Definition: status.h:35
grpc::AuthMetadataProcessor::OutputMetadata
std::multimap< std::string, std::string > OutputMetadata
Definition: auth_metadata_processor.h:38
grpc::AuthContext
Class encapsulating the Authentication Information.
Definition: auth_context.h:70
grpc::AuthMetadataProcessor::~AuthMetadataProcessor
virtual ~AuthMetadataProcessor()
Definition: auth_metadata_processor.h:40
auth_context.h
grpc::AuthMetadataProcessor::Process
virtual grpc::Status Process(const InputMetadata &auth_metadata, grpc::AuthContext *context, OutputMetadata *consumed_auth_metadata, OutputMetadata *response_metadata)=0
Processes a Call associated with a connection.
string_ref.h
grpc::AuthMetadataProcessor::IsBlocking
virtual bool IsBlocking() const
If this method returns true, the Process function will be scheduled in a different thread from the on...
Definition: auth_metadata_processor.h:44