GRPC Core  9.0.0
local_credentials.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2018 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 GRPC_CORE_LIB_SECURITY_CREDENTIALS_LOCAL_LOCAL_CREDENTIALS_H
20 #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_LOCAL_LOCAL_CREDENTIALS_H
21 
23 
24 #include <grpc/grpc_security.h>
25 
27 
28 /* Main class for grpc local channel credential. */
30  public:
32  ~grpc_local_credentials() override = default;
33 
37  const char* target_name, const grpc_channel_args* args,
38  grpc_channel_args** new_args) override;
39 
40  grpc_local_connect_type connect_type() const { return connect_type_; }
41 
42  private:
43  grpc_local_connect_type connect_type_;
44 };
45 
46 /* Main class for grpc local server credential. */
48  public:
50  ~grpc_local_server_credentials() override = default;
51 
53  create_security_connector() override;
54 
55  grpc_local_connect_type connect_type() const { return connect_type_; }
56 
57  private:
58  grpc_local_connect_type connect_type_;
59 };
60 
61 #endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_LOCAL_LOCAL_CREDENTIALS_H */
Definition: ref_counted_ptr.h:35
Definition: local_credentials.h:29
~grpc_local_credentials() override=default
grpc_local_credentials(grpc_local_connect_type connect_type)
Definition: local_credentials.cc:46
grpc_core::RefCountedPtr< grpc_channel_security_connector > create_security_connector(grpc_core::RefCountedPtr< grpc_call_credentials > request_metadata_creds, const char *target_name, const grpc_channel_args *args, grpc_channel_args **new_args) override
Definition: local_credentials.cc:33
grpc_local_connect_type connect_type() const
Definition: local_credentials.h:40
Definition: local_credentials.h:47
grpc_core::RefCountedPtr< grpc_server_security_connector > create_security_connector() override
Definition: local_credentials.cc:42
grpc_local_connect_type connect_type() const
Definition: local_credentials.h:55
grpc_local_server_credentials(grpc_local_connect_type connect_type)
Definition: local_credentials.cc:56
~grpc_local_server_credentials() override=default
grpc_local_connect_type
Type of local connections for which local channel/server credentials will be applied.
Definition: grpc_security_constants.h:112
An array of arguments that can be passed around.
Definition: grpc_types.h:132
Definition: credentials.h:100
Definition: credentials.h:264