Namespaces | Functions
jwt_credentials.cc File Reference
#include <grpc/support/port_platform.h>
#include "src/core/lib/security/credentials/jwt/jwt_credentials.h"
#include <inttypes.h>
#include <stdlib.h>
#include <map>
#include <string>
#include <utility>
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/json/json.h"
#include "src/core/lib/promise/poll.h"
#include "src/core/lib/promise/promise.h"
#include "src/core/lib/security/credentials/call_creds_util.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/uri/uri_parser.h"
Include dependency graph for jwt_credentials.cc:

Go to the source code of this file.

Namespaces

 grpc_core
 

Functions

grpc_call_credentialsgrpc_service_account_jwt_access_credentials_create (const char *json_key, gpr_timespec token_lifetime, void *reserved)
 
grpc_core::RefCountedPtr< grpc_call_credentialsgrpc_service_account_jwt_access_credentials_create_from_auth_json_key (grpc_auth_json_key key, gpr_timespec token_lifetime)
 
static char * redact_private_key (const char *json_key)
 
absl::StatusOr< std::string > grpc_core::RemoveServiceNameFromJwtUri (absl::string_view uri)
 

Function Documentation

◆ grpc_service_account_jwt_access_credentials_create()

grpc_call_credentials* grpc_service_account_jwt_access_credentials_create ( const char *  json_key,
gpr_timespec  token_lifetime,
void *  reserved 
)

Creates a JWT credentials object. May return NULL if the input is invalid.

  • json_key is the JSON key string containing the client's private key.
  • token_lifetime is the lifetime of each Json Web Token (JWT) created with this credentials. It should not exceed grpc_max_auth_token_lifetime or will be cropped to this value.

Definition at line 154 of file jwt_credentials.cc.

◆ grpc_service_account_jwt_access_credentials_create_from_auth_json_key()

grpc_core::RefCountedPtr<grpc_call_credentials> grpc_service_account_jwt_access_credentials_create_from_auth_json_key ( grpc_auth_json_key  key,
gpr_timespec  token_lifetime 
)

Definition at line 133 of file jwt_credentials.cc.

◆ redact_private_key()

static char* redact_private_key ( const char *  json_key)
static

Definition at line 143 of file jwt_credentials.cc.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:21