34 #ifndef GRPC_INTERNAL_CORE_SECURITY_JSON_TOKEN_H
35 #define GRPC_INTERNAL_CORE_SECURITY_JSON_TOKEN_H
38 #include <openssl/rsa.h>
44 #define GRPC_JWT_OAUTH2_AUDIENCE "https://www.googleapis.com/oauth2/v3/token"
46 #define GRPC_AUTH_JSON_TYPE_INVALID "invalid"
47 #define GRPC_AUTH_JSON_TYPE_SERVICE_ACCOUNT "service_account"
48 #define GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER "authorized_user"
66 const char *json_string);
84 typedef char *(*grpc_jwt_encode_and_sign_override)(
108 const char *json_string);
grpc_auth_refresh_token grpc_auth_refresh_token_create_from_json(const grpc_json *json)
Definition: json_token.c:345
grpc_auth_refresh_token grpc_auth_refresh_token_create_from_string(const char *json_string)
Definition: json_token.c:379
int grpc_auth_json_key_is_valid(const grpc_auth_json_key *json_key)
Definition: json_token.c:85
void grpc_auth_refresh_token_destruct(grpc_auth_refresh_token *refresh_token)
Definition: json_token.c:390
const char * type
Definition: json_token.h:95
grpc_auth_json_key grpc_auth_json_key_create_from_string(const char *json_string)
Definition: json_token.c:141
const char * type
Definition: json_token.h:53
char * refresh_token
Definition: json_token.h:98
char * private_key_id
Definition: json_token.h:54
void grpc_jwt_encode_and_sign_set_override(grpc_jwt_encode_and_sign_override func)
Definition: json_token.c:332
void grpc_auth_json_key_destruct(grpc_auth_json_key *json_key)
Definition: json_token.c:151
char * client_email
Definition: json_token.h:56
char * client_id
Definition: json_token.h:96
char * client_id
Definition: json_token.h:55
Definition: json_token.h:94
char *(* grpc_jwt_encode_and_sign_override)(const grpc_auth_json_key *json_key, const char *audience, gpr_timespec token_lifetime, const char *scope)
Definition: json_token.h:84
Definition: json_token.h:52
RSA * private_key
Definition: json_token.h:57
int grpc_auth_refresh_token_is_valid(const grpc_auth_refresh_token *refresh_token)
Definition: json_token.c:339
char * client_secret
Definition: json_token.h:97
grpc_auth_json_key grpc_auth_json_key_create_from_json(const grpc_json *json)
Definition: json_token.c:90
char * grpc_jwt_encode_and_sign(const grpc_auth_json_key *json_key, const char *audience, gpr_timespec token_lifetime, const char *scope)
Definition: json_token.c:312