#include <grpc/support/port_platform.h>
#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h"
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <atomic>
#include <map>
#include <memory>
#include <vector>
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "absl/strings/str_join.h"
#include "absl/strings/string_view.h"
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
#include <grpc/impl/codegen/gpr_slice.h>
#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/http/httpcli_ssl_credentials.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/load_file.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/json/json.h"
#include "src/core/lib/promise/context.h"
#include "src/core/lib/promise/poll.h"
#include "src/core/lib/promise/promise.h"
#include "src/core/lib/security/util/json_util.h"
#include "src/core/lib/slice/slice_refcount.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/transport/error_utils.h"
#include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/transport/transport.h"
#include "src/core/lib/uri/uri_parser.h"
Go to the source code of this file.
Namespaces | |
grpc_core | |
|
static |
Definition at line 497 of file oauth2_credentials.cc.
grpc_call_credentials* grpc_access_token_credentials_create | ( | const char * | access_token, |
void * | reserved | ||
) |
Creates an Oauth2 Access Token credentials with an access token that was acquired by an out of band mechanism.
Definition at line 744 of file oauth2_credentials.cc.
grpc_auth_refresh_token grpc_auth_refresh_token_create_from_json | ( | const grpc_core::Json & | json | ) |
Creates a refresh token object from parsed json. Returns an invalid object if a parsing error has been encountered.
Definition at line 79 of file oauth2_credentials.cc.
grpc_auth_refresh_token grpc_auth_refresh_token_create_from_string | ( | const char * | json_string | ) |
Creates a refresh token object from string. Returns an invalid object if a parsing error has been encountered.
Definition at line 115 of file oauth2_credentials.cc.
void grpc_auth_refresh_token_destruct | ( | grpc_auth_refresh_token * | refresh_token | ) |
Destructs the object.
Definition at line 127 of file oauth2_credentials.cc.
int grpc_auth_refresh_token_is_valid | ( | const grpc_auth_refresh_token * | refresh_token | ) |
Returns 1 if the object is valid, 0 otherwise.
Definition at line 73 of file oauth2_credentials.cc.
grpc_call_credentials* grpc_google_compute_engine_credentials_create | ( | void * | reserved | ) |
Creates a compute engine credentials object for connecting to Google. WARNING: Do NOT use this credentials to connect to a non-google service as this could result in an oauth2 token leak.
Definition at line 421 of file oauth2_credentials.cc.
grpc_call_credentials* grpc_google_refresh_token_credentials_create | ( | const char * | json_refresh_token, |
void * | reserved | ||
) |
Creates an Oauth2 Refresh Token credentials object for connecting to Google. May return NULL if the input is invalid. WARNING: Do NOT use this credentials to connect to a non-google service as this could result in an oauth2 token leak.
Definition at line 508 of file oauth2_credentials.cc.
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 at line 155 of file oauth2_credentials.cc.
grpc_core::RefCountedPtr<grpc_call_credentials> grpc_refresh_token_credentials_create_from_auth_refresh_token | ( | grpc_auth_refresh_token | refresh_token | ) |
Definition at line 476 of file oauth2_credentials.cc.
grpc_call_credentials* grpc_sts_credentials_create | ( | const grpc_sts_credentials_options * | options, |
void * | reserved | ||
) |
Creates an STS credentials following the STS Token Exchanged specifed in the IETF draft https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16. This API is used for experimental purposes for now and may change in the future.
Definition at line 701 of file oauth2_credentials.cc.
|
static |
Definition at line 238 of file oauth2_credentials.cc.
|
private |
Definition at line 656 of file oauth2_credentials.cc.
|
private |
Definition at line 657 of file oauth2_credentials.cc.
|
private |
Definition at line 651 of file oauth2_credentials.cc.
|
private |
Definition at line 649 of file oauth2_credentials.cc.
|
private |
Definition at line 658 of file oauth2_credentials.cc.
|
private |
Definition at line 653 of file oauth2_credentials.cc.
|
private |
Definition at line 650 of file oauth2_credentials.cc.
|
private |
Definition at line 652 of file oauth2_credentials.cc.
|
private |
Definition at line 648 of file oauth2_credentials.cc.
|
private |
Definition at line 654 of file oauth2_credentials.cc.
|
private |
Definition at line 655 of file oauth2_credentials.cc.