Moongazing.OrionGuard.Grpc 6.1.0

Suggested Alternatives

OrionGuard.Grpc

dotnet add package Moongazing.OrionGuard.Grpc --version 6.1.0
                    
NuGet\Install-Package Moongazing.OrionGuard.Grpc -Version 6.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Moongazing.OrionGuard.Grpc" Version="6.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Moongazing.OrionGuard.Grpc" Version="6.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Moongazing.OrionGuard.Grpc" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Moongazing.OrionGuard.Grpc --version 6.1.0
                    
#r "nuget: Moongazing.OrionGuard.Grpc, 6.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Moongazing.OrionGuard.Grpc@6.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Moongazing.OrionGuard.Grpc&version=6.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Moongazing.OrionGuard.Grpc&version=6.1.0
                    
Install as a Cake Tool

Moongazing.OrionGuard.Grpc

gRPC integration for OrionGuard. Adds a server-side interceptor that validates every incoming protobuf message with your OrionGuard validators before the service method runs.

What this package adds

  • OrionGuardInterceptor — a grpc-dotnet Interceptor that resolves IValidator<TRequest> from DI and runs it against every unary, client-streaming, server-streaming, and duplex call.
  • Status code translation — a validation failure becomes Status.FailedPrecondition (FAILED_PRECONDITION, numeric 9) with structured trailers carrying the field errors.
  • DI helper — AddOrionGuardGrpc() registers the interceptor singleton and scans your assemblies for validators.

Install

dotnet add package Moongazing.OrionGuard.Grpc

Requires Grpc.AspNetCore in your application. The core OrionGuard package is brought in transitively.

Quick start

using Moongazing.OrionGuard.Grpc;

builder.Services.AddOrionGuardGrpc();

builder.Services.AddGrpc(options =>
{
    options.Interceptors.Add<OrionGuardInterceptor>();
});

// Any IValidator<TRequest> registered in DI is applied automatically:
public sealed class CreateUserValidator : AbstractValidator<CreateUserRequest>
{
    public CreateUserValidator()
    {
        RuleFor(x => x.Email, "Email", p => p.NotEmpty().Email());
    }
}

Targets

.NET 8.0, .NET 9.0, .NET 10.0.

License

MIT. See the main repository for full docs, CHANGELOG, and samples.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.1.0 152 4/19/2026 6.1.0 is deprecated because it is no longer maintained and has critical bugs.