mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-14 07:26:47 +00:00
[gRPC] Add stream authentication to gRPC server (#1273)
This commit is contained in:
@@ -148,6 +148,7 @@ func StartRPCServer(engine *Engine) {
|
||||
opts := []grpc.ServerOption{
|
||||
grpc.Creds(creds),
|
||||
grpc.UnaryInterceptor(grpcauth.UnaryServerInterceptor(s.authenticateClient)),
|
||||
grpc.StreamInterceptor(grpcauth.StreamServerInterceptor(s.authenticateClient)),
|
||||
}
|
||||
server := grpc.NewServer(opts...)
|
||||
gctrpc.RegisterGoCryptoTraderServiceServer(server, &s)
|
||||
|
||||
Reference in New Issue
Block a user