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?
--
You received this message because you are subscribed to the Google Groups
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/7e6724ab-85dd-48d0-8aca-d56e22434167%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.