-
Notifications
You must be signed in to change notification settings - Fork 809
Open
Labels
questionFurther information is requestedFurther information is requested
Description
My use case is that i want to perform custom logic inside my CallCredentials implementation based on the metadata set manually during request creation.
So when i execute my gRPC call like this:
var response = await someService.ExecuteSomeMethod(new RequestClass(), headers: new Metadata
{
{ "CustomData", "some data" }
});
I would like to access the "CustomData" inside the CallCredentials, like this:
internal static async Task InterceptAuthentication(AuthInterceptorContext _, Metadata metadata, IServiceProvider provider)
{
var myCustomData = metadata["CustomData"];
}
So far, the passed metadata
is just empty and the documentation suggests that this is only for appending additional data. Right now i need to use very hacky AsyncLoca-based workaround for that. Is there a way to access the original metadata for the request here?
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested