15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CREDENTIALS_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CREDENTIALS_H
18#include "google/cloud/common_options.h"
19#include "google/cloud/options.h"
20#include "google/cloud/version.h"
30class CredentialsVisitor;
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
58 friend class internal::CredentialsVisitor;
59 virtual void dispatch(internal::CredentialsVisitor& visitor) = 0;
63
64
65
66
67
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
148 std::string
const& access_token,
149 std::chrono::system_clock::time_point expiration,
Options opts
= {});
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
196 std::string target_service_account,
Options opts
= {});
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
275
276
277
278
279
281 using Type = std::vector<std::string>;
285
286
287
288
289
291 using Type = std::vector<std::string>;
295
296
297
298
299
301 using Type = std::chrono::seconds;
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
347 using Type = std::string;
351using UnifiedCredentialsOptionList =
359
360
361
362
363
364struct UseInsecureChannelOption {
An opaque representation of the authentication configuration.
Definition: credentials.h:53
A class that holds option structs indexed by their type.
Definition: options.h:91
Options()=default
Constructs an empty instance.
std::shared_ptr< Credentials > MakeServiceAccountCredentials(std::string json_object, Options opts={})
Creates service account credentials from a service account key.
std::shared_ptr< Credentials > MakeAccessTokenCredentials(std::string const &access_token, std::chrono::system_clock::time_point expiration, Options opts={})
Creates credentials with a fixed access token.
std::shared_ptr< Credentials > MakeImpersonateServiceAccountCredentials(std::shared_ptr< Credentials > base_credentials, std::string target_service_account, Options opts={})
Creates credentials for service account impersonation.
std::shared_ptr< Credentials > MakeInsecureCredentials(Options opts={})
Create insecure (aka anonymous, aka unauthenticated) credentials.
std::shared_ptr< Credentials > MakeExternalAccountCredentials(std::string json_object, Options opts={})
Creates credentials based on external accounts.
std::shared_ptr< Credentials > MakeGoogleDefaultCredentials(Options opts={})
Creates the default credentials.
Contains all the Google Cloud C++ Library APIs.
Definition: async_operation.h:23
Definition: async_operation.h:22
Configure the access token lifetime.
Definition: credentials.h:300
Configures a custom CA (Certificates Authority) certificates file.
Definition: credentials.h:346
Configure the delegates for MakeImpersonateServiceAccountCredentials()
Definition: credentials.h:280
Configure the scopes for MakeImpersonateServiceAccountCredentials()
Definition: credentials.h:290
Return whether tracing is enabled for the given component.
Definition: common_options.h:70
A wrapper to store credentials into an options.
Definition: credentials.h:68
#define GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Definition: version.h:45
#define GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
Definition: version.h:43