aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Julien Boeuf <jboeuf@google.com>2015-08-19 22:17:03 -0700
committerGravatar Julien Boeuf <jboeuf@google.com>2015-08-19 22:17:03 -0700
commitee3dbb00789b463119242ea74c6c7317b42bee48 (patch)
tree626ad82373ab04bcc8a37950d8b616065f8190dc /include
parentb714648e517ccb647eaa2d79f529f3a0e6067ddf (diff)
Have a richer interface for auth metadata processors.
Diffstat (limited to 'include')
-rw-r--r--include/grpc/grpc_security.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h
index 640c1fda98..7f8f4d4a05 100644
--- a/include/grpc/grpc_security.h
+++ b/include/grpc/grpc_security.h
@@ -275,12 +275,18 @@ int grpc_auth_context_set_peer_identity_property_name(grpc_auth_context *ctx,
/* --- Auth Metadata Processing --- */
/* Callback function that is called when the metadata processing is done.
- success is 1 if processing succeeded, 0 otherwise.
- Consumed metadata will be removed from the set of metadata available on the
- call. */
+ - Consumed metadata will be removed from the set of metadata available on the
+ call. consumed_md may be NULL if no metadata has been consumed.
+ - Response metadata will be set on the response. response_md may be NULL.
+ - status is GRPC_STATUS_OK for success or a specific status for an error.
+ Common error status for auth metadata processing is either
+ GRPC_STATUS_UNAUTHENTICATED in case of an authentication failure or
+ GRPC_STATUS PERMISSION_DENIED in case of an authorization failure.
+ - error_details gives details about the error. May be NULL. */
typedef void (*grpc_process_auth_metadata_done_cb)(
void *user_data, const grpc_metadata *consumed_md, size_t num_consumed_md,
- int success);
+ const grpc_metadata *response_md, size_t num_response_md,
+ grpc_status_code status, const char *error_details);
/* Pluggable server-side metadata processor object. */
typedef struct {