[gRPC] Add stream authentication to gRPC server (#1273)

This commit is contained in:
TaltaM
2023-07-20 01:25:34 +02:00
committed by GitHub
parent 69d0f1d9a7
commit f48993dfdc
2 changed files with 2 additions and 0 deletions

View File

@@ -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)