GRPC Core  18.0.0
alts_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_ALTS_ALTS_CREDENTIALS_H
20 #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_ALTS_ALTS_CREDENTIALS_H
21 
23 
24 #include <grpc/grpc_security.h>
25 
28 
29 /* Main struct for grpc ALTS channel credential. */
31  public:
33  const char* handshaker_service_url);
34  ~grpc_alts_credentials() override;
35 
39  const char* target_name, const grpc_channel_args* args,
40  grpc_channel_args** new_args) override;
41 
42  const grpc_alts_credentials_options* options() const { return options_; }
44  const char* handshaker_service_url() const { return handshaker_service_url_; }
45 
46  private:
48  char* handshaker_service_url_;
49 };
50 
51 /* Main struct for grpc ALTS server credential. */
53  public:
55  const char* handshaker_service_url);
57 
59  create_security_connector(const grpc_channel_args* /* args */) override;
60 
61  const grpc_alts_credentials_options* options() const { return options_; }
63  const char* handshaker_service_url() const { return handshaker_service_url_; }
64 
65  private:
67  char* handshaker_service_url_;
68 };
69 
87  const grpc_alts_credentials_options* options,
88  const char* handshaker_service_url, bool enable_untrusted_alts);
89 
106  const grpc_alts_credentials_options* options,
107  const char* handshaker_service_url, bool enable_untrusted_alts);
108 
109 #endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_ALTS_ALTS_CREDENTIALS_H */
grpc_channel_credentials * grpc_alts_credentials_create_customized(const grpc_alts_credentials_options *options, const char *handshaker_service_url, bool enable_untrusted_alts)
This method creates an ALTS channel credential object with customized information provided by caller.
Definition: alts_credentials.cc:83
grpc_server_credentials * grpc_alts_server_credentials_create_customized(const grpc_alts_credentials_options *options, const char *handshaker_service_url, bool enable_untrusted_alts)
This method creates an ALTS server credential object with customized information provided by caller.
Definition: alts_credentials.cc:92
Definition: alts_credentials.h:30
grpc_alts_credentials_options * mutable_options()
Definition: alts_credentials.h:43
~grpc_alts_credentials() override
Definition: alts_credentials.cc:47
const char * handshaker_service_url() const
Definition: alts_credentials.h:44
const grpc_alts_credentials_options * options() const
Definition: alts_credentials.h:42
grpc_core::RefCountedPtr< grpc_channel_security_connector > create_security_connector(grpc_core::RefCountedPtr< grpc_call_credentials > call_creds, const char *target_name, const grpc_channel_args *args, grpc_channel_args **new_args) override
Definition: alts_credentials.cc:53
grpc_alts_credentials(const grpc_alts_credentials_options *options, const char *handshaker_service_url)
Definition: alts_credentials.cc:36
Definition: alts_credentials.h:52
const char * handshaker_service_url() const
Definition: alts_credentials.h:63
const grpc_alts_credentials_options * options() const
Definition: alts_credentials.h:61
grpc_alts_server_credentials(const grpc_alts_credentials_options *options, const char *handshaker_service_url)
Definition: alts_credentials.cc:61
grpc_alts_credentials_options * mutable_options()
Definition: alts_credentials.h:62
grpc_core::RefCountedPtr< grpc_server_security_connector > create_security_connector(const grpc_channel_args *) override
Definition: alts_credentials.cc:73
~grpc_alts_server_credentials() override
Definition: alts_credentials.cc:78
Definition: ref_counted_ptr.h:35
Definition: grpc_alts_credentials_options.h:35
An array of arguments that can be passed around.
Definition: grpc_types.h:132
Definition: credentials.h:102
Definition: credentials.h:224