diff --git a/pkg/internal/directory/service_rpc.go b/pkg/internal/directory/service_rpc.go index 9d140b7..f0ba2fa 100644 --- a/pkg/internal/directory/service_rpc.go +++ b/pkg/internal/directory/service_rpc.go @@ -66,6 +66,8 @@ func (v *ServiceRpcServer) AddService(ctx context.Context, info *proto.ServiceIn if info.GetId() != clientId { return nil, status.Errorf(codes.InvalidArgument, "client_id mismatch in metadata") + } else if len(clientId) == 0 { + return nil, status.Errorf(codes.InvalidArgument, "client_id must not be blank") } in := &ServiceInstance{ diff --git a/pkg/nex/const.go b/pkg/nex/const.go index b493f31..37d91e2 100644 --- a/pkg/nex/const.go +++ b/pkg/nex/const.go @@ -1,5 +1,6 @@ package nex const ( - ServiceTypeAuth = "id" + ServiceTypeAuth = "id" + ServiceTypePusher = "pusher" )