oauth2_credentials.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 
20 
22 
23 #include <stdlib.h>
24 #include <string.h>
25 
26 #include <algorithm>
27 #include <atomic>
28 #include <map>
29 #include <memory>
30 #include <vector>
31 
32 #include "absl/status/status.h"
33 #include "absl/strings/str_cat.h"
34 #include "absl/strings/str_format.h"
35 #include "absl/strings/str_join.h"
36 #include "absl/strings/string_view.h"
37 
38 #include <grpc/grpc.h>
39 #include <grpc/grpc_security.h>
41 #include <grpc/slice.h>
42 #include <grpc/support/alloc.h>
43 #include <grpc/support/log.h>
45 #include <grpc/support/time.h>
46 
55 #include "src/core/lib/json/json.h"
66 
67 using grpc_core::Json;
68 
69 //
70 // Auth Refresh Token.
71 //
72 
74  const grpc_auth_refresh_token* refresh_token) {
75  return (refresh_token != nullptr) &&
76  strcmp(refresh_token->type, GRPC_AUTH_JSON_TYPE_INVALID) != 0;
77 }
78 
80  const Json& json) {
82  const char* prop_value;
83  int success = 0;
85 
88  if (json.type() != Json::Type::OBJECT) {
89  gpr_log(GPR_ERROR, "Invalid json.");
90  goto end;
91  }
92 
93  prop_value = grpc_json_get_string_property(json, "type", &error);
94  GRPC_LOG_IF_ERROR("Parsing refresh token", error);
95  if (prop_value == nullptr ||
96  strcmp(prop_value, GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER) != 0) {
97  goto end;
98  }
100 
101  if (!grpc_copy_json_string_property(json, "client_secret",
102  &result.client_secret) ||
103  !grpc_copy_json_string_property(json, "client_id", &result.client_id) ||
104  !grpc_copy_json_string_property(json, "refresh_token",
105  &result.refresh_token)) {
106  goto end;
107  }
108  success = 1;
109 
110 end:
112  return result;
113 }
114 
116  const char* json_string) {
118  Json json = Json::Parse(json_string, &error);
119  if (!GRPC_ERROR_IS_NONE(error)) {
120  gpr_log(GPR_ERROR, "JSON parsing failed: %s",
123  }
125 }
126 
128  if (refresh_token == nullptr) return;
129  refresh_token->type = GRPC_AUTH_JSON_TYPE_INVALID;
130  if (refresh_token->client_id != nullptr) {
131  gpr_free(refresh_token->client_id);
132  refresh_token->client_id = nullptr;
133  }
134  if (refresh_token->client_secret != nullptr) {
135  gpr_free(refresh_token->client_secret);
136  refresh_token->client_secret = nullptr;
137  }
138  if (refresh_token->refresh_token != nullptr) {
139  gpr_free(refresh_token->refresh_token);
140  refresh_token->refresh_token = nullptr;
141  }
142 }
143 
144 //
145 // Oauth2 Token Fetcher credentials.
146 //
147 
152 }
153 
158  grpc_core::Duration* token_lifetime) {
159  char* null_terminated_body = nullptr;
161  Json json;
162 
163  if (response == nullptr) {
164  gpr_log(GPR_ERROR, "Received NULL response.");
166  goto end;
167  }
168 
169  if (response->body_length > 0) {
170  null_terminated_body =
171  static_cast<char*>(gpr_malloc(response->body_length + 1));
172  null_terminated_body[response->body_length] = '\0';
173  memcpy(null_terminated_body, response->body, response->body_length);
174  }
175 
176  if (response->status != 200) {
177  gpr_log(GPR_ERROR, "Call to http server ended with error %d [%s].",
178  response->status,
179  null_terminated_body != nullptr ? null_terminated_body : "");
181  goto end;
182  } else {
183  const char* access_token = nullptr;
184  const char* token_type = nullptr;
185  const char* expires_in = nullptr;
186  Json::Object::const_iterator it;
188  json = Json::Parse(null_terminated_body, &error);
189  if (!GRPC_ERROR_IS_NONE(error)) {
190  gpr_log(GPR_ERROR, "Could not parse JSON from %s: %s",
191  null_terminated_body, grpc_error_std_string(error).c_str());
194  goto end;
195  }
196  if (json.type() != Json::Type::OBJECT) {
197  gpr_log(GPR_ERROR, "Response should be a JSON object");
199  goto end;
200  }
201  it = json.object_value().find("access_token");
202  if (it == json.object_value().end() ||
203  it->second.type() != Json::Type::STRING) {
204  gpr_log(GPR_ERROR, "Missing or invalid access_token in JSON.");
206  goto end;
207  }
208  access_token = it->second.string_value().c_str();
209  it = json.object_value().find("token_type");
210  if (it == json.object_value().end() ||
211  it->second.type() != Json::Type::STRING) {
212  gpr_log(GPR_ERROR, "Missing or invalid token_type in JSON.");
214  goto end;
215  }
216  token_type = it->second.string_value().c_str();
217  it = json.object_value().find("expires_in");
218  if (it == json.object_value().end() ||
219  it->second.type() != Json::Type::NUMBER) {
220  gpr_log(GPR_ERROR, "Missing or invalid expires_in in JSON.");
222  goto end;
223  }
224  expires_in = it->second.string_value().c_str();
225  *token_lifetime =
226  grpc_core::Duration::Seconds(strtol(expires_in, nullptr, 10));
227  *token_value = grpc_core::Slice::FromCopiedString(
228  absl::StrCat(token_type, " ", access_token));
230  }
231 
232 end:
233  if (status != GRPC_CREDENTIALS_OK) *token_value = absl::nullopt;
234  gpr_free(null_terminated_body);
235  return status;
236 }
237 
238 static void on_oauth2_token_fetcher_http_response(void* user_data,
240  GRPC_LOG_IF_ERROR("oauth_fetch", GRPC_ERROR_REF(error));
242  static_cast<grpc_credentials_metadata_request*>(user_data);
244  reinterpret_cast<grpc_oauth2_token_fetcher_credentials*>(r->creds.get());
245  c->on_http_response(r, error);
246 }
247 
250  absl::optional<grpc_core::Slice> access_token_value;
251  grpc_core::Duration token_lifetime;
255  &r->response, &access_token_value, &token_lifetime)
257  // Update cache and grab list of pending requests.
258  gpr_mu_lock(&mu_);
259  token_fetch_pending_ = false;
260  if (access_token_value.has_value()) {
261  access_token_value_ = access_token_value->Ref();
262  } else {
263  access_token_value_ = absl::nullopt;
264  }
267  token_lifetime.as_timespec())
270  pending_requests_ = nullptr;
271  gpr_mu_unlock(&mu_);
272  // Invoke callbacks for all pending requests.
273  while (pending_request != nullptr) {
274  if (status == GRPC_CREDENTIALS_OK) {
275  pending_request->md->Append(
276  GRPC_AUTHORIZATION_METADATA_KEY, access_token_value->Ref(),
277  [](absl::string_view, const grpc_core::Slice&) { abort(); });
278  pending_request->result = std::move(pending_request->md);
279  } else {
281  "Error occurred when fetching oauth2 token.", &error, 1);
282  pending_request->result = grpc_error_to_absl_status(err);
284  }
285  pending_request->done.store(true, std::memory_order_release);
286  pending_request->waker.Wakeup();
288  pending_request->pollent, grpc_polling_entity_pollset_set(&pollent_));
289  grpc_oauth2_pending_get_request_metadata* prev = pending_request;
290  pending_request = pending_request->next;
291  prev->Unref();
292  }
293  delete r;
294 }
295 
298  grpc_core::ClientMetadataHandle initial_metadata,
300  // Check if we can use the cached token.
301  absl::optional<grpc_core::Slice> cached_access_token_value;
302  gpr_mu_lock(&mu_);
304  gpr_time_cmp(
307  GPR_TIMESPAN)) > 0) {
308  cached_access_token_value = access_token_value_->Ref();
309  }
310  if (cached_access_token_value.has_value()) {
311  gpr_mu_unlock(&mu_);
312  initial_metadata->Append(
313  GRPC_AUTHORIZATION_METADATA_KEY, std::move(*cached_access_token_value),
314  [](absl::string_view, const grpc_core::Slice&) { abort(); });
315  return grpc_core::Immediate(std::move(initial_metadata));
316  }
317  // Couldn't get the token from the cache.
318  // Add request to pending_requests_ and start a new fetch if needed.
319  grpc_core::Duration refresh_threshold =
321  auto pending_request =
322  grpc_core::MakeRefCounted<grpc_oauth2_pending_get_request_metadata>();
323  pending_request->pollent = grpc_core::GetContext<grpc_polling_entity>();
324  pending_request->waker = grpc_core::Activity::current()->MakeNonOwningWaker();
326  pending_request->pollent, grpc_polling_entity_pollset_set(&pollent_));
327  pending_request->next = pending_requests_;
328  pending_request->md = std::move(initial_metadata);
329  pending_requests_ = pending_request->Ref().release();
330  bool start_fetch = false;
331  if (!token_fetch_pending_) {
332  token_fetch_pending_ = true;
333  start_fetch = true;
334  }
335  gpr_mu_unlock(&mu_);
336  if (start_fetch) {
339  grpc_core::ExecCtx::Get()->Now() + refresh_threshold);
340  }
341  return
342  [pending_request]()
344  if (!pending_request->done.load(std::memory_order_acquire)) {
345  return grpc_core::Pending{};
346  }
347  return std::move(pending_request->result);
348  };
349 }
350 
352  : token_expiration_(gpr_inf_past(GPR_CLOCK_MONOTONIC)),
355  gpr_mu_init(&mu_);
356 }
357 
359  return "OAuth2TokenFetcherCredentials";
360 }
361 
363  static grpc_core::UniqueTypeName::Factory kFactory("Oauth2");
364  return kFactory.Create();
365 }
366 
367 //
368 // Google Compute Engine credentials.
369 //
370 
371 namespace {
372 
373 class grpc_compute_engine_token_fetcher_credentials
375  public:
376  grpc_compute_engine_token_fetcher_credentials() = default;
377  ~grpc_compute_engine_token_fetcher_credentials() override = default;
378 
379  protected:
381  grpc_polling_entity* pollent,
382  grpc_iomgr_cb_func response_cb,
383  grpc_core::Timestamp deadline) override {
384  grpc_http_header header = {const_cast<char*>("Metadata-Flavor"),
385  const_cast<char*>("Google")};
387  memset(&request, 0, sizeof(grpc_http_request));
388  request.hdr_count = 1;
389  request.hdrs = &header;
390  /* TODO(ctiller): Carry the memory quota in ctx and share it with the host
391  channel. This would allow us to cancel an authentication query when under
392  extreme memory pressure. */
395  {} /* query params */, "" /* fragment */);
396  GPR_ASSERT(uri.ok()); // params are hardcoded
398  std::move(*uri), nullptr /* channel args */, pollent, &request,
399  deadline,
400  GRPC_CLOSURE_INIT(&http_get_cb_closure_, response_cb, metadata_req,
401  grpc_schedule_on_exec_ctx),
402  &metadata_req->response,
405  http_request_->Start();
406  }
407 
408  std::string debug_string() override {
409  return absl::StrFormat(
410  "GoogleComputeEngineTokenFetcherCredentials{%s}",
412  }
413 
414  private:
415  grpc_closure http_get_cb_closure_;
417 };
418 
419 } // namespace
420 
422  void* reserved) {
423  GRPC_API_TRACE("grpc_compute_engine_credentials_create(reserved=%p)", 1,
424  (reserved));
425  GPR_ASSERT(reserved == nullptr);
427  grpc_compute_engine_token_fetcher_credentials>()
428  .release();
429 }
430 
431 //
432 // Google Refresh Token credentials.
433 //
434 
438 }
439 
441  grpc_credentials_metadata_request* metadata_req,
442  grpc_polling_entity* pollent, grpc_iomgr_cb_func response_cb,
443  grpc_core::Timestamp deadline) {
445  const_cast<char*>("Content-Type"),
446  const_cast<char*>("application/x-www-form-urlencoded")};
451  memset(&request, 0, sizeof(grpc_http_request));
452  request.hdr_count = 1;
453  request.hdrs = &header;
454  request.body = const_cast<char*>(body.c_str());
455  request.body_length = body.size();
456  /* TODO(ctiller): Carry the memory quota in ctx and share it with the host
457  channel. This would allow us to cancel an authentication query when under
458  extreme memory pressure. */
461  {} /* query params */, "" /* fragment */);
462  GPR_ASSERT(uri.ok()); // params are hardcoded
464  std::move(*uri), nullptr /* channel args */, pollent, &request, deadline,
465  GRPC_CLOSURE_INIT(&http_post_cb_closure_, response_cb, metadata_req,
466  grpc_schedule_on_exec_ctx),
468  http_request_->Start();
469 }
470 
472  grpc_auth_refresh_token refresh_token)
473  : refresh_token_(refresh_token) {}
474 
477  grpc_auth_refresh_token refresh_token) {
478  if (!grpc_auth_refresh_token_is_valid(&refresh_token)) {
479  gpr_log(GPR_ERROR, "Invalid input for refresh token credentials creation");
480  return nullptr;
481  }
482  return grpc_core::MakeRefCounted<grpc_google_refresh_token_credentials>(
483  refresh_token);
484 }
485 
487  return absl::StrFormat("GoogleRefreshToken{ClientID:%s,%s}",
490 }
491 
493  static grpc_core::UniqueTypeName::Factory kFactory("GoogleRefreshToken");
494  return kFactory.Create();
495 }
496 
498  grpc_auth_refresh_token* token) {
499  if (strcmp(token->type, GRPC_AUTH_JSON_TYPE_INVALID) == 0) {
500  return "<Invalid json token>";
501  }
502  return absl::StrFormat(
503  "{\n type: %s\n client_id: %s\n client_secret: "
504  "<redacted>\n refresh_token: <redacted>\n}",
505  token->type, token->client_id);
506 }
507 
509  const char* json_refresh_token, void* reserved) {
511  grpc_auth_refresh_token_create_from_string(json_refresh_token);
514  "grpc_refresh_token_credentials_create(json_refresh_token=%s, "
515  "reserved=%p)",
516  create_loggable_refresh_token(&token).c_str(), reserved);
517  }
518  GPR_ASSERT(reserved == nullptr);
520  .release();
521 }
522 
523 //
524 // STS credentials.
525 //
526 
527 namespace grpc_core {
528 
529 namespace {
530 
531 void MaybeAddToBody(const char* field_name, const char* field,
532  std::vector<std::string>* body) {
533  if (field == nullptr || strlen(field) == 0) return;
534  body->push_back(absl::StrFormat("&%s=%s", field_name, field));
535 }
536 
537 grpc_error_handle LoadTokenFile(const char* path, gpr_slice* token) {
539  if (!GRPC_ERROR_IS_NONE(err)) return err;
540  if (GRPC_SLICE_LENGTH(*token) == 0) {
541  gpr_log(GPR_ERROR, "Token file %s is empty", path);
542  err = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Token file is empty.");
543  }
544  return err;
545 }
546 
547 class StsTokenFetcherCredentials
549  public:
550  StsTokenFetcherCredentials(URI sts_url,
552  : sts_url_(std::move(sts_url)),
553  resource_(gpr_strdup(options->resource)),
554  audience_(gpr_strdup(options->audience)),
555  scope_(gpr_strdup(options->scope)),
556  requested_token_type_(gpr_strdup(options->requested_token_type)),
557  subject_token_path_(gpr_strdup(options->subject_token_path)),
558  subject_token_type_(gpr_strdup(options->subject_token_type)),
559  actor_token_path_(gpr_strdup(options->actor_token_path)),
560  actor_token_type_(gpr_strdup(options->actor_token_type)) {}
561 
562  std::string debug_string() override {
563  return absl::StrFormat(
564  "StsTokenFetcherCredentials{Path:%s,Authority:%s,%s}", sts_url_.path(),
565  sts_url_.authority(),
567  }
568 
569  private:
570  void fetch_oauth2(grpc_credentials_metadata_request* metadata_req,
571  grpc_polling_entity* pollent,
572  grpc_iomgr_cb_func response_cb,
573  Timestamp deadline) override {
575  memset(&request, 0, sizeof(grpc_http_request));
576  grpc_error_handle err = FillBody(&request.body, &request.body_length);
577  if (!GRPC_ERROR_IS_NONE(err)) {
578  response_cb(metadata_req, err);
580  return;
581  }
583  const_cast<char*>("Content-Type"),
584  const_cast<char*>("application/x-www-form-urlencoded")};
585  request.hdr_count = 1;
586  request.hdrs = &header;
587  /* TODO(ctiller): Carry the memory quota in ctx and share it with the host
588  channel. This would allow us to cancel an authentication query when under
589  extreme memory pressure. */
590  RefCountedPtr<grpc_channel_credentials> http_request_creds;
591  if (sts_url_.scheme() == "http") {
592  http_request_creds = RefCountedPtr<grpc_channel_credentials>(
594  } else {
595  http_request_creds = CreateHttpRequestSSLCredentials();
596  }
598  sts_url_, nullptr /* channel args */, pollent, &request, deadline,
599  GRPC_CLOSURE_INIT(&http_post_cb_closure_, response_cb, metadata_req,
600  grpc_schedule_on_exec_ctx),
601  &metadata_req->response, std::move(http_request_creds));
602  http_request_->Start();
603  gpr_free(request.body);
604  }
605 
606  grpc_error_handle FillBody(char** body, size_t* body_length) {
607  *body = nullptr;
608  std::vector<std::string> body_parts;
609  grpc_slice subject_token = grpc_empty_slice();
610  grpc_slice actor_token = grpc_empty_slice();
612 
613  auto cleanup = [&body, &body_length, &body_parts, &subject_token,
614  &actor_token, &err]() {
615  if (GRPC_ERROR_IS_NONE(err)) {
616  std::string body_str = absl::StrJoin(body_parts, "");
617  *body = gpr_strdup(body_str.c_str());
618  *body_length = body_str.size();
619  }
620  grpc_slice_unref_internal(subject_token);
621  grpc_slice_unref_internal(actor_token);
622  return err;
623  };
624 
625  err = LoadTokenFile(subject_token_path_.get(), &subject_token);
626  if (!GRPC_ERROR_IS_NONE(err)) return cleanup();
627  body_parts.push_back(absl::StrFormat(
629  reinterpret_cast<const char*>(GRPC_SLICE_START_PTR(subject_token)),
630  subject_token_type_.get()));
631  MaybeAddToBody("resource", resource_.get(), &body_parts);
632  MaybeAddToBody("audience", audience_.get(), &body_parts);
633  MaybeAddToBody("scope", scope_.get(), &body_parts);
634  MaybeAddToBody("requested_token_type", requested_token_type_.get(),
635  &body_parts);
636  if ((actor_token_path_ != nullptr) && *actor_token_path_ != '\0') {
637  err = LoadTokenFile(actor_token_path_.get(), &actor_token);
638  if (!GRPC_ERROR_IS_NONE(err)) return cleanup();
639  MaybeAddToBody(
640  "actor_token",
641  reinterpret_cast<const char*>(GRPC_SLICE_START_PTR(actor_token)),
642  &body_parts);
643  MaybeAddToBody("actor_token_type", actor_token_type_.get(), &body_parts);
644  }
645  return cleanup();
646  }
647 
648  URI sts_url_;
650  UniquePtr<char> resource_;
651  UniquePtr<char> audience_;
652  UniquePtr<char> scope_;
653  UniquePtr<char> requested_token_type_;
654  UniquePtr<char> subject_token_path_;
655  UniquePtr<char> subject_token_type_;
656  UniquePtr<char> actor_token_path_;
657  UniquePtr<char> actor_token_type_;
658  OrphanablePtr<HttpRequest> http_request_;
659 };
660 
661 } // namespace
662 
665  std::vector<grpc_error_handle> error_list;
666  absl::StatusOr<URI> sts_url =
667  URI::Parse(options->token_exchange_service_uri == nullptr
668  ? ""
669  : options->token_exchange_service_uri);
670  if (!sts_url.ok()) {
671  error_list.push_back(GRPC_ERROR_CREATE_FROM_CPP_STRING(
672  absl::StrFormat("Invalid or missing STS endpoint URL. Error: %s",
673  sts_url.status().ToString())));
674  } else if (sts_url->scheme() != "https" && sts_url->scheme() != "http") {
675  error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
676  "Invalid URI scheme, must be https to http."));
677  }
678  if (options->subject_token_path == nullptr ||
679  strlen(options->subject_token_path) == 0) {
680  error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
681  "subject_token needs to be specified"));
682  }
683  if (options->subject_token_type == nullptr ||
684  strlen(options->subject_token_type) == 0) {
685  error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
686  "subject_token_type needs to be specified"));
687  }
688  if (error_list.empty()) {
689  return sts_url;
690  }
691  auto grpc_error_vec = GRPC_ERROR_CREATE_FROM_VECTOR(
692  "Invalid STS Credentials Options", &error_list);
693  auto retval =
695  GRPC_ERROR_UNREF(grpc_error_vec);
696  return retval;
697 }
698 
699 } // namespace grpc_core
700 
702  const grpc_sts_credentials_options* options, void* reserved) {
703  GPR_ASSERT(reserved == nullptr);
706  if (!sts_url.ok()) {
707  gpr_log(GPR_ERROR, "STS Credentials creation failed. Error: %s.",
708  sts_url.status().ToString().c_str());
709  return nullptr;
710  }
711  return grpc_core::MakeRefCounted<grpc_core::StsTokenFetcherCredentials>(
712  std::move(*sts_url), options)
713  .release();
714 }
715 
716 //
717 // Oauth2 Access Token credentials.
718 //
719 
722  grpc_core::ClientMetadataHandle initial_metadata,
724  initial_metadata->Append(
726  [](absl::string_view, const grpc_core::Slice&) { abort(); });
727  return grpc_core::Immediate(std::move(initial_metadata));
728 }
729 
731  static grpc_core::UniqueTypeName::Factory kFactory("AccessToken");
732  return kFactory.Create();
733 }
734 
736  const char* access_token)
737  : access_token_value_(grpc_core::Slice::FromCopiedString(
738  absl::StrCat("Bearer ", access_token))) {}
739 
741  return absl::StrFormat("AccessTokenCredentials{Token:present}");
742 }
743 
745  const char* access_token, void* reserved) {
747  "grpc_access_token_credentials_create(access_token=<redacted>, "
748  "reserved=%p)",
749  1, (reserved));
750  GPR_ASSERT(reserved == nullptr);
751  return grpc_core::MakeRefCounted<grpc_access_token_credentials>(access_token)
752  .release();
753 }
GRPC_CLOSURE_INIT
#define GRPC_CLOSURE_INIT(closure, cb, cb_arg, scheduler)
Definition: closure.h:115
trace.h
absl::InvalidArgumentError
Status InvalidArgumentError(absl::string_view message)
Definition: third_party/abseil-cpp/absl/status/status.cc:351
grpc_access_token_credentials::Type
static grpc_core::UniqueTypeName Type()
Definition: oauth2_credentials.cc:730
GPR_TIMESPAN
@ GPR_TIMESPAN
Definition: gpr_types.h:45
grpc_core::Activity::MakeNonOwningWaker
virtual Waker MakeNonOwningWaker()=0
_gevent_test_main.result
result
Definition: _gevent_test_main.py:96
GPR_INFO
#define GPR_INFO
Definition: include/grpc/impl/codegen/log.h:56
cleanup.Json
Json
Definition: cleanup.py:49
grpc_core::UniqueTypeName::Factory::Create
UniqueTypeName Create()
Definition: unique_type_name.h:67
gpr_mu_unlock
GPRAPI void gpr_mu_unlock(gpr_mu *mu)
grpc_core::MakeRefCounted
RefCountedPtr< T > MakeRefCounted(Args &&... args)
Definition: ref_counted_ptr.h:335
regen-readme.it
it
Definition: regen-readme.py:15
GRPC_ERROR_NONE
#define GRPC_ERROR_NONE
Definition: error.h:234
grpc_call_credentials::GetRequestMetadataArgs
Definition: src/core/lib/security/credentials/credentials.h:196
grpc_core::Slice::Ref
Slice Ref() const
Definition: src/core/lib/slice/slice.h:368
log.h
metadata_batch.h
grpc_core::MetadataMap::Append
void Append(absl::string_view key, Slice value, MetadataParseErrorFn on_error)
Definition: metadata_batch.h:1156
grpc_load_file
grpc_error_handle grpc_load_file(const char *filename, int add_null_terminator, grpc_slice *output)
Definition: load_file.cc:33
grpc_core::Json::type
Type type() const
Definition: src/core/lib/json/json.h:174
cleanup
void cleanup(void)
Definition: bloaty/third_party/zlib/examples/enough.c:182
absl::StrCat
std::string StrCat(const AlphaNum &a, const AlphaNum &b)
Definition: abseil-cpp/absl/strings/str_cat.cc:98
memset
return memset(p, 0, total)
load_file.h
grpc_google_refresh_token_credentials::refresh_token_
grpc_auth_refresh_token refresh_token_
Definition: oauth2_credentials.h:169
absl::StrFormat
ABSL_MUST_USE_RESULT std::string StrFormat(const FormatSpec< Args... > &format, const Args &... args)
Definition: abseil-cpp/absl/strings/str_format.h:338
grpc_auth_refresh_token::client_id
char * client_id
Definition: oauth2_credentials.h:62
Timestamp
Definition: bloaty/third_party/protobuf/src/google/protobuf/timestamp.pb.h:69
grpc_google_refresh_token_credentials::~grpc_google_refresh_token_credentials
~grpc_google_refresh_token_credentials() override
Definition: oauth2_credentials.cc:436
GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH
#define GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH
Definition: src/core/lib/security/credentials/credentials.h:67
slice.h
grpc_auth_refresh_token::type
const char * type
Definition: oauth2_credentials.h:61
grpc_core
Definition: call_metric_recorder.h:31
GRPC_CREDENTIALS_ERROR
@ GRPC_CREDENTIALS_ERROR
Definition: src/core/lib/security/credentials/credentials.h:50
GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING
#define GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING
Definition: src/core/lib/security/credentials/credentials.h:73
grpc_core::Activity::current
static Activity * current()
Definition: activity.h:124
grpc_core::Slice
Definition: src/core/lib/slice/slice.h:282
grpc_auth_refresh_token::client_secret
char * client_secret
Definition: oauth2_credentials.h:63
grpc_sts_credentials_options
Definition: grpc_security.h:355
string.h
options
double_dict options[]
Definition: capstone_test.c:55
benchmark.request
request
Definition: benchmark.py:77
grpc_oauth2_pending_get_request_metadata::md
grpc_core::ClientMetadataHandle md
Definition: oauth2_credentials.h:102
absl::string_view
Definition: abseil-cpp/absl/strings/string_view.h:167
grpc_pollset_set_create
grpc_pollset_set * grpc_pollset_set_create()
Definition: pollset_set.cc:29
grpc_core::Timestamp
Definition: src/core/lib/gprpp/time.h:62
grpc_refresh_token_credentials_create_from_auth_refresh_token
grpc_core::RefCountedPtr< grpc_call_credentials > grpc_refresh_token_credentials_create_from_auth_refresh_token(grpc_auth_refresh_token refresh_token)
Definition: oauth2_credentials.cc:476
gpr_free
GPRAPI void gpr_free(void *ptr)
Definition: alloc.cc:51
grpc_access_token_credentials::grpc_access_token_credentials
grpc_access_token_credentials(const char *access_token)
Definition: oauth2_credentials.cc:735
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
error
grpc_error_handle error
Definition: retry_filter.cc:499
error_ref_leak.err
err
Definition: error_ref_leak.py:35
grpc_core::Json::object_value
const Object & object_value() const
Definition: src/core/lib/json/json.h:177
grpc_oauth2_pending_get_request_metadata
Definition: oauth2_credentials.h:97
grpc_google_refresh_token_credentials::fetch_oauth2
void fetch_oauth2(grpc_credentials_metadata_request *req, grpc_polling_entity *pollent, grpc_iomgr_cb_func cb, grpc_core::Timestamp deadline) override
Definition: oauth2_credentials.cc:440
gpr_malloc
GPRAPI void * gpr_malloc(size_t size)
Definition: alloc.cc:29
GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING
#define GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(desc, errs, count)
Definition: error.h:307
grpc_call_credentials
Definition: src/core/lib/security/credentials/credentials.h:189
grpc_google_refresh_token_credentials::debug_string
std::string debug_string() override
Definition: oauth2_credentials.cc:486
grpc_access_token_credentials::GetRequestMetadata
grpc_core::ArenaPromise< absl::StatusOr< grpc_core::ClientMetadataHandle > > GetRequestMetadata(grpc_core::ClientMetadataHandle initial_metadata, const GetRequestMetadataArgs *args) override
Definition: oauth2_credentials.cc:721
grpc_auth_refresh_token_create_from_json
grpc_auth_refresh_token grpc_auth_refresh_token_create_from_json(const Json &json)
Definition: oauth2_credentials.cc:79
status
absl::Status status
Definition: rls.cc:251
grpc_json_get_string_property
const char * grpc_json_get_string_property(const grpc_core::Json &json, const char *prop_name, grpc_error_handle *error)
Definition: src/core/lib/security/util/json_util.cc:33
grpc_core::ValidateStsCredentialsOptions
absl::StatusOr< URI > ValidateStsCredentialsOptions(const grpc_sts_credentials_options *options)
Definition: oauth2_credentials.cc:663
grpc_core::RefCountedPtr::release
T * release()
Definition: ref_counted_ptr.h:140
GRPC_LOG_IF_ERROR
#define GRPC_LOG_IF_ERROR(what, error)
Definition: error.h:398
time.h
check_documentation.path
path
Definition: check_documentation.py:57
grpc_oauth2_pending_get_request_metadata::next
struct grpc_oauth2_pending_get_request_metadata * next
Definition: oauth2_credentials.h:103
grpc_core::HttpRequest::Post
static OrphanablePtr< HttpRequest > Post(URI uri, const grpc_channel_args *args, grpc_polling_entity *pollent, const grpc_http_request *request, Timestamp deadline, grpc_closure *on_done, grpc_http_response *response, RefCountedPtr< grpc_channel_credentials > channel_creds) GRPC_MUST_USE_RESULT
Definition: httpcli.cc:95
grpc_google_compute_engine_credentials_create
grpc_call_credentials * grpc_google_compute_engine_credentials_create(void *reserved)
Definition: oauth2_credentials.cc:421
grpc_core::CreateHttpRequestSSLCredentials
RefCountedPtr< grpc_channel_credentials > CreateHttpRequestSSLCredentials()
Definition: httpcli_security_connector.cc:208
grpc_security.h
grpc_auth_refresh_token
Definition: oauth2_credentials.h:60
grpc_oauth2_token_fetcher_credentials::mu_
gpr_mu mu_
Definition: oauth2_credentials.h:139
grpc_core::URI::Parse
static absl::StatusOr< URI > Parse(absl::string_view uri_text)
Definition: uri_parser.cc:209
grpc_access_token_credentials_create
grpc_call_credentials * grpc_access_token_credentials_create(const char *access_token, void *reserved)
Definition: oauth2_credentials.cc:744
GRPC_TRACE_FLAG_ENABLED
#define GRPC_TRACE_FLAG_ENABLED(f)
Definition: debug/trace.h:114
grpc_auth_refresh_token_destruct
void grpc_auth_refresh_token_destruct(grpc_auth_refresh_token *refresh_token)
Destructs the object.
Definition: oauth2_credentials.cc:127
GRPC_ERROR_CREATE_FROM_VECTOR
#define GRPC_ERROR_CREATE_FROM_VECTOR(desc, error_list)
Definition: error.h:314
grpc_oauth2_token_fetcher_credentials::GetRequestMetadata
grpc_core::ArenaPromise< absl::StatusOr< grpc_core::ClientMetadataHandle > > GetRequestMetadata(grpc_core::ClientMetadataHandle initial_metadata, const GetRequestMetadataArgs *args) override
Definition: oauth2_credentials.cc:297
GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER
#define GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER
Definition: src/core/lib/security/util/json_util.h:30
grpc_oauth2_token_fetcher_credentials
Definition: oauth2_credentials.h:112
memory.h
actor_token_path_
UniquePtr< char > actor_token_path_
Definition: oauth2_credentials.cc:656
grpc_oauth2_pending_get_request_metadata::done
std::atomic< bool > done
Definition: oauth2_credentials.h:99
audience_
UniquePtr< char > audience_
Definition: oauth2_credentials.cc:651
gpr_mu_destroy
GPRAPI void gpr_mu_destroy(gpr_mu *mu)
string_util.h
grpc_core::RefCounted::Unref
void Unref()
Definition: ref_counted.h:302
grpc_http_response
Definition: src/core/lib/http/parser.h:85
grpc_core::Pending
Definition: poll.h:29
memcpy
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
c
void c(T a)
Definition: miscompile_with_no_unique_address_test.cc:40
grpc_core::slice_detail::CopyConstructors< Slice >::FromCopiedString
static Slice FromCopiedString(const char *s)
Definition: src/core/lib/slice/slice.h:173
grpc_core::RefCountedPtr< grpc_channel_credentials >
absl::move
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
Definition: abseil-cpp/absl/utility/utility.h:221
GPR_ASSERT
#define GPR_ASSERT(x)
Definition: include/grpc/impl/codegen/log.h:94
end
char * end
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1008
grpc_oauth2_token_fetcher_credentials_parse_server_response
grpc_credentials_status grpc_oauth2_token_fetcher_credentials_parse_server_response(const grpc_http_response *response, absl::optional< grpc_core::Slice > *token_value, grpc_core::Duration *token_lifetime)
Definition: oauth2_credentials.cc:155
absl::StrJoin
std::string StrJoin(Iterator start, Iterator end, absl::string_view sep, Formatter &&fmt)
Definition: abseil-cpp/absl/strings/str_join.h:239
grpc_http_header
Definition: src/core/lib/http/parser.h:36
gpr_time_cmp
GPRAPI int gpr_time_cmp(gpr_timespec a, gpr_timespec b)
Definition: src/core/lib/gpr/time.cc:30
grpc_polling_entity_pollset_set
grpc_pollset_set * grpc_polling_entity_pollset_set(grpc_polling_entity *pollent)
Definition: polling_entity.cc:49
absl::optional::has_value
constexpr bool has_value() const noexcept
Definition: abseil-cpp/absl/types/optional.h:461
gen_stats_data.c_str
def c_str(s, encoding='ascii')
Definition: gen_stats_data.py:38
Json
JSON (JavaScript Object Notation).
Definition: third_party/bloaty/third_party/protobuf/conformance/third_party/jsoncpp/json.h:227
GRPC_SECURE_TOKEN_REFRESH_THRESHOLD_SECS
#define GRPC_SECURE_TOKEN_REFRESH_THRESHOLD_SECS
Definition: src/core/lib/security/credentials/credentials.h:60
gpr_time_sub
GPRAPI gpr_timespec gpr_time_sub(gpr_timespec a, gpr_timespec b)
Definition: src/core/lib/gpr/time.cc:168
gpr_log
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
gpr_mu_init
GPRAPI void gpr_mu_init(gpr_mu *mu)
grpc_oauth2_token_fetcher_credentials::on_http_response
void on_http_response(grpc_credentials_metadata_request *r, grpc_error_handle error)
Definition: oauth2_credentials.cc:248
grpc_google_refresh_token_credentials::http_request_
grpc_core::OrphanablePtr< grpc_core::HttpRequest > http_request_
Definition: oauth2_credentials.h:171
grpc_google_refresh_token_credentials::grpc_google_refresh_token_credentials
grpc_google_refresh_token_credentials(grpc_auth_refresh_token refresh_token)
Definition: oauth2_credentials.cc:471
GRPC_STS_POST_MINIMAL_BODY_FORMAT_STRING
#define GRPC_STS_POST_MINIMAL_BODY_FORMAT_STRING
Definition: oauth2_credentials.h:55
grpc_google_refresh_token_credentials::type
grpc_core::UniqueTypeName type() const override
Definition: oauth2_credentials.cc:492
httpcli_ssl_credentials.h
grpc.h
grpc_pollset_set_destroy
void grpc_pollset_set_destroy(grpc_pollset_set *pollset_set)
Definition: pollset_set.cc:33
grpc_auth_refresh_token_create_from_string
grpc_auth_refresh_token grpc_auth_refresh_token_create_from_string(const char *json_string)
Definition: oauth2_credentials.cc:115
GRPC_AUTHORIZATION_METADATA_KEY
#define GRPC_AUTHORIZATION_METADATA_KEY
Definition: src/core/lib/security/credentials/credentials.h:55
header
struct absl::base_internal::@2940::AllocList::Header header
GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH
#define GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH
Definition: src/core/lib/security/credentials/credentials.h:63
grpc_oauth2_token_fetcher_credentials::debug_string
std::string debug_string() override
Definition: oauth2_credentials.cc:358
absl::optional< grpc_core::Slice >
grpc_insecure_credentials_create
GRPCAPI grpc_channel_credentials * grpc_insecure_credentials_create()
Definition: core/lib/security/credentials/insecure/insecure_credentials.cc:64
grpc_oauth2_token_fetcher_credentials::token_expiration_
gpr_timespec token_expiration_
Definition: oauth2_credentials.h:141
pollset_set.h
GRPC_SLICE_START_PTR
#define GRPC_SLICE_START_PTR(slice)
Definition: include/grpc/impl/codegen/slice.h:101
grpc_polling_entity_del_from_pollset_set
void grpc_polling_entity_del_from_pollset_set(grpc_polling_entity *pollent, grpc_pollset_set *pss_dst)
Definition: polling_entity.cc:78
GRPC_GOOGLE_OAUTH2_SERVICE_HOST
#define GRPC_GOOGLE_OAUTH2_SERVICE_HOST
Definition: src/core/lib/security/credentials/credentials.h:66
grpc_empty_slice
GPRAPI grpc_slice grpc_empty_slice(void)
Definition: slice/slice.cc:42
grpc_slice
Definition: include/grpc/impl/codegen/slice.h:65
GPR_CLOCK_MONOTONIC
@ GPR_CLOCK_MONOTONIC
Definition: gpr_types.h:36
grpc_oauth2_token_fetcher_credentials::~grpc_oauth2_token_fetcher_credentials
~grpc_oauth2_token_fetcher_credentials() override
Definition: oauth2_credentials.cc:149
gpr_mu_lock
GPRAPI void gpr_mu_lock(gpr_mu *mu)
absl::flags_internal::Parse
bool Parse(FlagOpFn op, absl::string_view text, void *dst, std::string *error)
Definition: abseil-cpp/absl/flags/internal/flag.h:125
error.h
grpc_copy_json_string_property
bool grpc_copy_json_string_property(const grpc_core::Json &json, const char *prop_name, char **copied_value)
Definition: src/core/lib/security/util/json_util.cc:61
grpc_polling_entity
Definition: polling_entity.h:38
sts_url_
URI sts_url_
Definition: oauth2_credentials.cc:648
json.h
GPR_ERROR
#define GPR_ERROR
Definition: include/grpc/impl/codegen/log.h:57
grpc_oauth2_token_fetcher_credentials::pollent_
grpc_polling_entity pollent_
Definition: oauth2_credentials.h:144
grpc_oauth2_token_fetcher_credentials::pending_requests_
grpc_oauth2_pending_get_request_metadata * pending_requests_
Definition: oauth2_credentials.h:143
gpr_now
GPRAPI gpr_timespec gpr_now(gpr_clock_type clock)
grpc_credentials_metadata_request
Definition: oauth2_credentials.h:85
promise.h
grpc_oauth2_token_fetcher_credentials::access_token_value_
absl::optional< grpc_core::Slice > access_token_value_
Definition: oauth2_credentials.h:140
grpc_auth_refresh_token::refresh_token
char * refresh_token
Definition: oauth2_credentials.h:64
grpc_core::MetadataHandle< ClientMetadata >
grpc_oauth2_token_fetcher_credentials::token_fetch_pending_
bool token_fetch_pending_
Definition: oauth2_credentials.h:142
GRPC_ERROR_CREATE_FROM_STATIC_STRING
#define GRPC_ERROR_CREATE_FROM_STATIC_STRING(desc)
Definition: error.h:291
GRPC_SLICE_LENGTH
#define GRPC_SLICE_LENGTH(slice)
Definition: include/grpc/impl/codegen/slice.h:104
subject_token_type_
UniquePtr< char > subject_token_type_
Definition: oauth2_credentials.cc:655
GRPC_COMPUTE_ENGINE_METADATA_HOST
#define GRPC_COMPUTE_ENGINE_METADATA_HOST
Definition: src/core/lib/security/credentials/credentials.h:62
resource_
UniquePtr< char > resource_
Definition: oauth2_credentials.cc:650
gpr_inf_past
GPRAPI gpr_timespec gpr_inf_past(gpr_clock_type type)
Definition: src/core/lib/gpr/time.cc:63
create_loggable_refresh_token
static std::string create_loggable_refresh_token(grpc_auth_refresh_token *token)
Definition: oauth2_credentials.cc:497
grpc_core::URI::scheme
const std::string & scheme() const
Definition: uri_parser.h:68
absl::Now
ABSL_NAMESPACE_BEGIN Time Now()
Definition: abseil-cpp/absl/time/clock.cc:39
absl::StatusOr::ok
ABSL_MUST_USE_RESULT bool ok() const
Definition: abseil-cpp/absl/status/statusor.h:491
grpc_api_trace
grpc_core::TraceFlag grpc_api_trace(false, "api")
GRPC_ERROR_REF
#define GRPC_ERROR_REF(err)
Definition: error.h:261
field
const FieldDescriptor * field
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/parser_unittest.cc:2692
grpc_core::HttpRequest::Get
static OrphanablePtr< HttpRequest > Get(URI uri, const grpc_channel_args *args, grpc_polling_entity *pollent, const grpc_http_request *request, Timestamp deadline, grpc_closure *on_done, grpc_http_response *response, RefCountedPtr< grpc_channel_credentials > channel_creds) GRPC_MUST_USE_RESULT
Definition: httpcli.cc:69
grpc_core::UniqueTypeName
Definition: unique_type_name.h:56
actor_token_type_
UniquePtr< char > actor_token_type_
Definition: oauth2_credentials.cc:657
scope_
UniquePtr< char > scope_
Definition: oauth2_credentials.cc:652
grpc_oauth2_pending_get_request_metadata::pollent
grpc_polling_entity * pollent
Definition: oauth2_credentials.h:101
gpr_time_add
GPRAPI gpr_timespec gpr_time_add(gpr_timespec a, gpr_timespec b)
Definition: src/core/lib/gpr/time.cc:135
grpc_core::ArenaPromise
Definition: arena_promise.h:152
grpc_error_std_string
std::string grpc_error_std_string(grpc_error_handle error)
Definition: error.cc:944
poll.h
grpc_core::Duration::as_timespec
gpr_timespec as_timespec() const
Definition: src/core/lib/gprpp/time.cc:171
grpc_access_token_credentials::access_token_value_
const grpc_core::Slice access_token_value_
Definition: oauth2_credentials.h:196
grpc_credentials_metadata_request::response
grpc_http_response response
Definition: oauth2_credentials.h:94
grpc_core::URI::Create
static absl::StatusOr< URI > Create(std::string scheme, std::string authority, std::string path, std::vector< QueryParam > query_parameter_pairs, std::string fragment)
Definition: uri_parser.cc:289
GRPC_ERROR_CREATE_FROM_CPP_STRING
#define GRPC_ERROR_CREATE_FROM_CPP_STRING(desc)
Definition: error.h:297
grpc_oauth2_token_fetcher_credentials::fetch_oauth2
virtual void fetch_oauth2(grpc_credentials_metadata_request *req, grpc_polling_entity *pollent, grpc_iomgr_cb_func cb, grpc_core::Timestamp deadline)=0
alloc.h
grpc_core::OrphanablePtr
std::unique_ptr< T, Deleter > OrphanablePtr
Definition: orphanable.h:64
fix_build_deps.r
r
Definition: fix_build_deps.py:491
asyncio_get_stats.response
response
Definition: asyncio_get_stats.py:28
std
Definition: grpcpp/impl/codegen/async_unary_call.h:407
grpc_iomgr_cb_func
void(* grpc_iomgr_cb_func)(void *arg, grpc_error_handle error)
Definition: closure.h:53
grpc_polling_entity_add_to_pollset_set
void grpc_polling_entity_add_to_pollset_set(grpc_polling_entity *pollent, grpc_pollset_set *pss_dst)
Definition: polling_entity.cc:61
http_request_
OrphanablePtr< HttpRequest > http_request_
Definition: oauth2_credentials.cc:658
grpc_core::Duration::Seconds
static constexpr Duration Seconds(int64_t seconds)
Definition: src/core/lib/gprpp/time.h:151
grpc_access_token_credentials::debug_string
std::string debug_string() override
Definition: oauth2_credentials.cc:740
http_post_cb_closure_
grpc_closure http_post_cb_closure_
Definition: oauth2_credentials.cc:649
gpr_slice
#define gpr_slice
Definition: gpr_slice.h:35
grpc_oauth2_pending_get_request_metadata::result
absl::StatusOr< grpc_core::ClientMetadataHandle > result
Definition: oauth2_credentials.h:104
exec_ctx.h
GRPC_CREDENTIALS_OK
@ GRPC_CREDENTIALS_OK
Definition: src/core/lib/security/credentials/credentials.h:49
on_oauth2_token_fetcher_http_response
static void on_oauth2_token_fetcher_http_response(void *user_data, grpc_error_handle error)
Definition: oauth2_credentials.cc:238
slice_refcount.h
GRPC_ERROR_UNREF
#define GRPC_ERROR_UNREF(err)
Definition: error.h:262
ref_counted_ptr.h
transport.h
grpc_oauth2_pending_get_request_metadata::waker
grpc_core::Waker waker
Definition: oauth2_credentials.h:100
grpc_oauth2_token_fetcher_credentials::type
grpc_core::UniqueTypeName type() const override
Definition: oauth2_credentials.cc:362
release
return ret release()
Definition: doc/python/sphinx/conf.py:37
context.h
api_trace.h
gpr_strdup
GPRAPI char * gpr_strdup(const char *src)
Definition: string.cc:39
grpc_core::Immediate
promise_detail::Immediate< T > Immediate(T value)
Definition: promise/promise.h:73
gpr_slice.h
absl
Definition: abseil-cpp/absl/algorithm/algorithm.h:31
grpc_google_refresh_token_credentials::http_post_cb_closure_
grpc_closure http_post_cb_closure_
Definition: oauth2_credentials.h:170
grpc_oauth2_token_fetcher_credentials::grpc_oauth2_token_fetcher_credentials
grpc_oauth2_token_fetcher_credentials()
Definition: oauth2_credentials.cc:351
grpc_core::Waker::Wakeup
void Wakeup()
Definition: activity.h:77
absl::StatusOr
Definition: abseil-cpp/absl/status/statusor.h:187
uri_parser.h
cleanup
Definition: cleanup.py:1
json_util.h
grpc_credentials_status
grpc_credentials_status
Definition: src/core/lib/security/credentials/credentials.h:48
grpc_error
Definition: error_internal.h:42
grpc_polling_entity_create_from_pollset_set
grpc_polling_entity grpc_polling_entity_create_from_pollset_set(grpc_pollset_set *pollset_set)
Definition: polling_entity.cc:26
oauth2_credentials.h
grpc_core::Duration
Definition: src/core/lib/gprpp/time.h:122
grpc_error_to_absl_status
absl::Status grpc_error_to_absl_status(grpc_error_handle error)
Definition: error_utils.cc:156
absl::variant
Definition: abseil-cpp/absl/types/internal/variant.h:46
grpc_closure
Definition: closure.h:56
grpc_core::UniqueTypeName::Factory
Definition: unique_type_name.h:60
grpc_google_refresh_token_credentials_create
grpc_call_credentials * grpc_google_refresh_token_credentials_create(const char *json_refresh_token, void *reserved)
Definition: oauth2_credentials.cc:508
grpc_sts_credentials_create
grpc_call_credentials * grpc_sts_credentials_create(const grpc_sts_credentials_options *options, void *reserved)
Definition: oauth2_credentials.cc:701
requested_token_type_
UniquePtr< char > requested_token_type_
Definition: oauth2_credentials.cc:653
grpc_auth_refresh_token_is_valid
int grpc_auth_refresh_token_is_valid(const grpc_auth_refresh_token *refresh_token)
Returns 1 if the object is valid, 0 otherwise.
Definition: oauth2_credentials.cc:73
grpc_core::ExecCtx::Get
static ExecCtx * Get()
Definition: exec_ctx.h:205
subject_token_path_
UniquePtr< char > subject_token_path_
Definition: oauth2_credentials.cc:654
grpc_core::RefCounted::Ref
RefCountedPtr< Child > Ref() GRPC_MUST_USE_RESULT
Definition: ref_counted.h:287
GRPC_API_TRACE
#define GRPC_API_TRACE(fmt, nargs, args)
Definition: api_trace.h:48
grpc_slice_unref_internal
void grpc_slice_unref_internal(const grpc_slice &slice)
Definition: slice_refcount.h:39
pollent_
grpc_polling_entity pollent_
Definition: google_c2p_resolver.cc:135
absl::StatusOr::status
const Status & status() const &
Definition: abseil-cpp/absl/status/statusor.h:678
error_utils.h
gpr_time_from_seconds
GPRAPI gpr_timespec gpr_time_from_seconds(int64_t s, gpr_clock_type clock_type)
Definition: src/core/lib/gpr/time.cc:123
GRPC_ERROR_IS_NONE
#define GRPC_ERROR_IS_NONE(err)
Definition: error.h:241
GRPC_AUTH_JSON_TYPE_INVALID
#define GRPC_AUTH_JSON_TYPE_INVALID
Definition: src/core/lib/security/util/json_util.h:28
grpc_http_request
Definition: src/core/lib/http/parser.h:69
port_platform.h


grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:43