GRPC Core  9.0.0
Macros | Functions
json_token.cc File Reference
#include <grpc/support/port_platform.h>
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/security/credentials/jwt/json_token.h"
#include <string.h>
#include <grpc/grpc_security.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/security/util/json_util.h"
#include "src/core/lib/slice/b64.h"
#include <openssl/bio.h>
#include <openssl/evp.h>
#include <openssl/pem.h>

Macros

#define GRPC_JWT_RSA_SHA256_ALGORITHM   "RS256"
 
#define GRPC_JWT_TYPE   "JWT"
 

Functions

gpr_timespec grpc_max_auth_token_lifetime ()
 
int grpc_auth_json_key_is_valid (const grpc_auth_json_key *json_key)
 
grpc_auth_json_key grpc_auth_json_key_create_from_json (const grpc_json *json)
 
grpc_auth_json_key grpc_auth_json_key_create_from_string (const char *json_string)
 
void grpc_auth_json_key_destruct (grpc_auth_json_key *json_key)
 
const EVP_MD * openssl_digest_from_algorithm (const char *algorithm)
 
char * compute_and_encode_signature (const grpc_auth_json_key *json_key, const char *signature_algorithm, const char *to_sign)
 
char * grpc_jwt_encode_and_sign (const grpc_auth_json_key *json_key, const char *audience, gpr_timespec token_lifetime, const char *scope)
 
void grpc_jwt_encode_and_sign_set_override (grpc_jwt_encode_and_sign_override func)
 

Macro Definition Documentation

◆ GRPC_JWT_RSA_SHA256_ALGORITHM

#define GRPC_JWT_RSA_SHA256_ALGORITHM   "RS256"

◆ GRPC_JWT_TYPE

#define GRPC_JWT_TYPE   "JWT"

Function Documentation

◆ compute_and_encode_signature()

char* compute_and_encode_signature ( const grpc_auth_json_key json_key,
const char *  signature_algorithm,
const char *  to_sign 
)

◆ grpc_auth_json_key_create_from_json()

grpc_auth_json_key grpc_auth_json_key_create_from_json ( const grpc_json json)

◆ grpc_auth_json_key_create_from_string()

grpc_auth_json_key grpc_auth_json_key_create_from_string ( const char *  json_string)

◆ grpc_auth_json_key_destruct()

void grpc_auth_json_key_destruct ( grpc_auth_json_key json_key)

◆ grpc_auth_json_key_is_valid()

int grpc_auth_json_key_is_valid ( const grpc_auth_json_key json_key)

◆ grpc_jwt_encode_and_sign()

char* grpc_jwt_encode_and_sign ( const grpc_auth_json_key json_key,
const char *  audience,
gpr_timespec  token_lifetime,
const char *  scope 
)

◆ grpc_jwt_encode_and_sign_set_override()

void grpc_jwt_encode_and_sign_set_override ( grpc_jwt_encode_and_sign_override  func)

◆ grpc_max_auth_token_lifetime()

gpr_timespec grpc_max_auth_token_lifetime ( void  )

◆ openssl_digest_from_algorithm()

const EVP_MD* openssl_digest_from_algorithm ( const char *  algorithm)