19 #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H
20 #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H
32 #define GRPC_STS_POST_MINIMAL_BODY_FORMAT_STRING \
33 "grant_type=urn:ietf:params:oauth:grant-type:token-exchange&subject_token=%" \
34 "s&subject_token_type=%s"
50 const char* json_string);
100 bool token_fetch_pending_ =
false;
115 return refresh_token_;
Definition: oauth2_credentials.h:132
std::string debug_string() override
Definition: oauth2_credentials.cc:742
~grpc_access_token_credentials() override
Definition: oauth2_credentials.cc:716
grpc_access_token_credentials(const char *access_token)
Definition: oauth2_credentials.cc:733
void cancel_get_request_metadata(grpc_credentials_mdelem_array *md_array, grpc_error_handle error) override
Definition: oauth2_credentials.cc:728
bool get_request_metadata(grpc_polling_entity *pollent, grpc_auth_metadata_context context, grpc_credentials_mdelem_array *md_array, grpc_closure *on_request_metadata, grpc_error_handle *error) override
Definition: oauth2_credentials.cc:720
Definition: oauth2_credentials.h:108
std::string debug_string() override
Definition: oauth2_credentials.cc:483
void fetch_oauth2(grpc_credentials_metadata_request *req, grpc_httpcli_context *httpcli_context, grpc_polling_entity *pollent, grpc_iomgr_cb_func cb, grpc_millis deadline) override
Definition: oauth2_credentials.cc:438
~grpc_google_refresh_token_credentials() override
Definition: oauth2_credentials.cc:434
const grpc_auth_refresh_token & refresh_token() const
Definition: oauth2_credentials.h:114
grpc_google_refresh_token_credentials(grpc_auth_refresh_token refresh_token)
Definition: oauth2_credentials.cc:468
Definition: oauth2_credentials.h:72
void on_http_response(grpc_credentials_metadata_request *r, grpc_error_handle error)
Definition: oauth2_credentials.cc:234
virtual void fetch_oauth2(grpc_credentials_metadata_request *req, grpc_httpcli_context *httpcli_context, grpc_polling_entity *pollent, grpc_iomgr_cb_func cb, grpc_millis deadline)=0
void cancel_get_request_metadata(grpc_credentials_mdelem_array *md_array, grpc_error_handle error) override
Definition: oauth2_credentials.cc:328
std::string debug_string() override
Definition: oauth2_credentials.cc:364
grpc_oauth2_token_fetcher_credentials()
Definition: oauth2_credentials.cc:355
bool get_request_metadata(grpc_polling_entity *pollent, grpc_auth_metadata_context context, grpc_credentials_mdelem_array *md_array, grpc_closure *on_request_metadata, grpc_error_handle *error) override
Definition: oauth2_credentials.cc:278
~grpc_oauth2_token_fetcher_credentials() override
Definition: oauth2_credentials.cc:129
void(* grpc_iomgr_cb_func)(void *arg, grpc_error_handle error)
gRPC Callback definition.
Definition: closure.h:53
int64_t grpc_millis
Definition: exec_ctx.h:37
pthread_mutex_t gpr_mu
Definition: sync_posix.h:45
grpc_error_handle error
Definition: lame_client.cc:54
Round Robin Policy.
Definition: backend_metric.cc:26
absl::StatusOr< URI > ValidateStsCredentialsOptions(const grpc_sts_credentials_options *options)
Definition: oauth2_credentials.cc:658
void grpc_auth_refresh_token_destruct(grpc_auth_refresh_token *refresh_token)
Destructs the object.
Definition: oauth2_credentials.cc:107
grpc_auth_refresh_token grpc_auth_refresh_token_create_from_json(const grpc_core::Json &json)
Creates a refresh token object from parsed json.
Definition: oauth2_credentials.cc:59
grpc_credentials_status grpc_oauth2_token_fetcher_credentials_parse_server_response(const struct grpc_http_response *response, grpc_mdelem *token_md, grpc_millis *token_lifetime)
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:53
grpc_auth_refresh_token grpc_auth_refresh_token_create_from_string(const char *json_string)
Creates a refresh token object from string.
Definition: oauth2_credentials.cc:95
grpc_core::RefCountedPtr< grpc_call_credentials > grpc_refresh_token_credentials_create_from_auth_refresh_token(grpc_auth_refresh_token token)
Definition: oauth2_credentials.cc:473
grpc_credentials_status
Definition: credentials.h:43
Analogous to struct timespec.
Definition: gpr_types.h:47
Context that can be used by metadata credentials plugin in order to create auth related metadata.
Definition: grpc_security.h:402
Definition: oauth2_credentials.h:37
char * refresh_token
Definition: oauth2_credentials.h:41
char * client_id
Definition: oauth2_credentials.h:39
const char * type
Definition: oauth2_credentials.h:38
char * client_secret
Definition: oauth2_credentials.h:40
Definition: credentials.h:173
A closure over a grpc_iomgr_cb_func.
Definition: closure.h:56
Definition: credentials.h:153
Definition: error_internal.h:41
Definition: metadata.h:98
Definition: polling_entity.h:37
Options for creating STS Oauth Token Exchange credentials following the IETF draft https://tools....
Definition: grpc_security.h:366