Example code using Grpc.Core 1.19.0:
var asyncAuthInterceptor = new AsyncAuthInterceptor((context, metadata) =>
{
metadata.Add("jwtToken", GetToken());
return Task.CompletedTask;
});
var gRpcClient = new MyService.MyServiceClient(new Channel($"127.0.0.1:{port}", ChannelCredentials.Insecure));
gRpcClient.Ping(new PingMessage(), new CallOptions(credentials: CallCredentials.FromInterceptor(asyncAuthInterceptor)));
When I debug into the server's Ping method implementation, I can't see a jwtToken in any of the exposed properties on the ServerCallContext. Is this where I should expect to see it? If so, is it expected that this metadata would be ignored/removed?