diff options
author | Craig Tiller <ctiller@google.com> | 2016-11-14 08:02:45 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-11-14 08:02:45 -0800 |
commit | 3cf79228ffcdd5c867b4067d6f6a5743a14d3ff1 (patch) | |
tree | 86778cc9c61666939677f67956a4f6539a79b6bf /src/core/lib/security/credentials | |
parent | d5a7a8a61eb3c1d5759f79c9cb4667a4d2df0d25 (diff) |
Review feedback
Diffstat (limited to 'src/core/lib/security/credentials')
-rw-r--r-- | src/core/lib/security/credentials/jwt/jwt_verifier.c | 10 | ||||
-rw-r--r-- | src/core/lib/security/credentials/jwt/jwt_verifier.h | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.c b/src/core/lib/security/credentials/jwt/jwt_verifier.c index 0281db385b..71febc248a 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.c +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.c @@ -629,7 +629,7 @@ static void on_keys_retrieved(grpc_exec_ctx *exec_ctx, void *user_data, end: if (json != NULL) grpc_json_destroy(json); if (verification_key != NULL) EVP_PKEY_free(verification_key); - ctx->user_cb(ctx->user_data, status, claims); + ctx->user_cb(exec_ctx, ctx->user_data, status, claims); verifier_cb_ctx_destroy(exec_ctx, ctx); } @@ -682,7 +682,8 @@ static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data, error: if (json != NULL) grpc_json_destroy(json); - ctx->user_cb(ctx->user_data, GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR, NULL); + ctx->user_cb(exec_ctx, ctx->user_data, GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR, + NULL); verifier_cb_ctx_destroy(exec_ctx, ctx); } @@ -793,7 +794,8 @@ static void retrieve_key_and_verify(grpc_exec_ctx *exec_ctx, return; error: - ctx->user_cb(ctx->user_data, GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR, NULL); + ctx->user_cb(exec_ctx, ctx->user_data, GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR, + NULL); verifier_cb_ctx_destroy(exec_ctx, ctx); } @@ -844,7 +846,7 @@ void grpc_jwt_verifier_verify(grpc_exec_ctx *exec_ctx, error: if (header != NULL) jose_header_destroy(exec_ctx, header); if (claims != NULL) grpc_jwt_claims_destroy(exec_ctx, claims); - cb(user_data, GRPC_JWT_VERIFIER_BAD_FORMAT, NULL); + cb(exec_ctx, user_data, GRPC_JWT_VERIFIER_BAD_FORMAT, NULL); } grpc_jwt_verifier *grpc_jwt_verifier_create( diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.h b/src/core/lib/security/credentials/jwt/jwt_verifier.h index c084575bcf..b79f411903 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.h +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.h @@ -115,7 +115,8 @@ void grpc_jwt_verifier_destroy(grpc_jwt_verifier *verifier); is done (maybe in another thread). It is the responsibility of the callee to call grpc_jwt_claims_destroy on the claims. */ -typedef void (*grpc_jwt_verification_done_cb)(void *user_data, +typedef void (*grpc_jwt_verification_done_cb)(grpc_exec_ctx *exec_ctx, + void *user_data, grpc_jwt_verifier_status status, grpc_jwt_claims *claims); |