secure_create_auth_context.cc
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 #include <memory>
19 
20 #include <grpc/grpc_security.h>
23 
27 
28 namespace grpc {
29 
30 std::shared_ptr<const AuthContext> CreateAuthContext(grpc_call* call) {
31  if (call == nullptr) {
32  return std::shared_ptr<const AuthContext>();
33  }
35  return std::make_shared<SecureAuthContext>(ctx.get());
36 }
37 
38 } // namespace grpc
ctx
Definition: benchmark-async.c:30
grpc
Definition: grpcpp/alarm.h:33
ctx
static struct test_ctx ctx
Definition: test-ipc-send-recv.c:65
secure_auth_context.h
grpc_security.h
call
FilterStackCall * call
Definition: call.cc:750
grpc_types.h
grpc_core::RefCountedPtr< grpc_auth_context >
grpc_call
struct grpc_call grpc_call
Definition: grpc_types.h:70
grpc_call_auth_context
GRPCAPI grpc_auth_context * grpc_call_auth_context(grpc_call *call)
Definition: security_context.cc:69
security_context.h
grpc::CreateAuthContext
std::shared_ptr< const AuthContext > CreateAuthContext(grpc_call *call)
Definition: insecure_create_auth_context.cc:25
ref_counted_ptr.h
auth_context.h


grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:15