GRPC C++  1.26.0
auth_metadata_processor_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_AUTH_METADATA_PROCESSOR_IMPL_H
20 #define GRPCPP_SECURITY_AUTH_METADATA_PROCESSOR_IMPL_H
21 
22 #include <map>
23 
25 #include <grpcpp/support/status.h>
27 
28 namespace grpc_impl {
29 
34  public:
35  typedef std::multimap<grpc::string_ref, grpc::string_ref> InputMetadata;
36  typedef std::multimap<grpc::string, grpc::string> OutputMetadata;
37 
39 
42  virtual bool IsBlocking() const { return true; }
43 
53  virtual grpc::Status Process(const InputMetadata& auth_metadata,
54  grpc::AuthContext* context,
55  OutputMetadata* consumed_auth_metadata,
56  OutputMetadata* response_metadata) = 0;
57 };
58 
59 } // namespace grpc_impl
60 
61 #endif // GRPCPP_SECURITY_AUTH_METADATA_PROCESSOR_IMPL_H
Class encapsulating the Authentication Information.
Definition: auth_context.h:65
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_impl.h:42
Interface allowing custom server-side authorization based on credentials encoded in metadata...
Definition: auth_metadata_processor_impl.h:33
virtual ~AuthMetadataProcessor()
Definition: auth_metadata_processor_impl.h:38
std::multimap< grpc::string, grpc::string > OutputMetadata
Definition: auth_metadata_processor_impl.h:36
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm_impl.h:33
virtual grpc::Status Process(const InputMetadata &auth_metadata, grpc::AuthContext *context, OutputMetadata *consumed_auth_metadata, OutputMetadata *response_metadata)=0
context is read/write: it contains the properties of the channel peer and it is the job of the Proces...
Did it work? If it didn&#39;t, why?
Definition: status.h:31
std::multimap< grpc::string_ref, grpc::string_ref > InputMetadata
Definition: auth_metadata_processor_impl.h:35