Lines Matching defs:jwt
19 #include "src/core/lib/security/credentials/jwt/jwt_verifier.h"
31 #include "src/core/lib/security/credentials/jwt/json_token.h"
68 /* Trick our JWT library into issuing a JWT with iss=accounts.google.com. */
355 char* jwt = nullptr;
362 jwt = grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime,
365 GPR_ASSERT(jwt != nullptr);
366 grpc_jwt_verifier_verify(verifier, nullptr, jwt, expected_audience,
370 gpr_free(jwt);
388 char* jwt = nullptr;
395 jwt = grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime,
398 GPR_ASSERT(jwt != nullptr);
399 grpc_jwt_verifier_verify(verifier, nullptr, jwt, expected_audience,
403 gpr_free(jwt);
435 char* jwt = nullptr;
442 jwt = grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime,
445 GPR_ASSERT(jwt != nullptr);
446 grpc_jwt_verifier_verify(verifier, nullptr, jwt, expected_audience,
450 gpr_free(jwt);
474 char* jwt = nullptr;
481 jwt = grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime,
484 GPR_ASSERT(jwt != nullptr);
485 grpc_jwt_verifier_verify(verifier, nullptr, jwt, expected_audience,
490 gpr_free(jwt);
497 char* jwt = nullptr;
504 jwt = grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime,
507 GPR_ASSERT(jwt != nullptr);
508 grpc_jwt_verifier_verify(verifier, nullptr, jwt, expected_audience,
513 gpr_free(jwt);
517 static void corrupt_jwt_sig(char* jwt) {
521 char* last_dot = strrchr(jwt, '.');
548 char* jwt = nullptr;
555 jwt = grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime,
558 corrupt_jwt_sig(jwt);
559 GPR_ASSERT(jwt != nullptr);
560 grpc_jwt_verifier_verify(verifier, nullptr, jwt, expected_audience,
563 gpr_free(jwt);
590 grpc_jwt_verifier_verify(verifier, nullptr, "bad jwt", expected_audience,