JJConsulting.Infinity.Client.AspNetCore 1.5.0-rc.9

This is a prerelease version of JJConsulting.Infinity.Client.AspNetCore.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package JJConsulting.Infinity.Client.AspNetCore --version 1.5.0-rc.9
                    
NuGet\Install-Package JJConsulting.Infinity.Client.AspNetCore -Version 1.5.0-rc.9
                    
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="JJConsulting.Infinity.Client.AspNetCore" Version="1.5.0-rc.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JJConsulting.Infinity.Client.AspNetCore" Version="1.5.0-rc.9" />
                    
Directory.Packages.props
<PackageReference Include="JJConsulting.Infinity.Client.AspNetCore" />
                    
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 JJConsulting.Infinity.Client.AspNetCore --version 1.5.0-rc.9
                    
#r "nuget: JJConsulting.Infinity.Client.AspNetCore, 1.5.0-rc.9"
                    
#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 JJConsulting.Infinity.Client.AspNetCore@1.5.0-rc.9
                    
#: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=JJConsulting.Infinity.Client.AspNetCore&version=1.5.0-rc.9&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=JJConsulting.Infinity.Client.AspNetCore&version=1.5.0-rc.9&prerelease
                    
Install as a Cake Tool

JJConsulting.Infinity.Client.ReverseProxy

Configure the regular Infinity client with a token containing the ReverseProxyRegistration permission, then add automatic registration:

builder.Services
    .AddInfinityClient(options =>
    {
        options.BaseAddress = builder.Configuration["Infinity:BaseAddress"]!;
        options.Token = builder.Configuration["Infinity:Token"]!;
    })
    .AddReverseProxyAutoRegistration(options =>
    {
        options.AppName = "Orders";
        options.PathPrefix = "orders";
        options.Routes.Add(new()
        {
            Path = "/openapi/v1.json",
            AuthenticationMode = ReverseProxyAuthenticationMode.Anonymous,
            RouteType = ReverseProxyRouteType.OpenApi
        });
    });

Address and InstanceId can be explicitly configured. When omitted, the hosted service discovers the ASP.NET Core server address and creates a process-unique instance ID.

Auto-registration is disabled by default when the host environment is Development. Destinations can be configured manually in Infinity. To explicitly enable auto-registration during development:

options.IsDisabled = false;

To synchronize the application's menu at startup, chain .AddMenuItems<OrdersMenuItemProvider>() after AddReverseProxyAutoRegistration. Implement IMenuConfigurationProvider from JJConsulting.Infinity.Domain.Contracts with ValueTask ConfigureAsync(MenuConfigurationBuilder, CancellationToken). The provider is resolved in a DI scope, and its items are synchronized using the configured AppName.

using JJConsulting.Infinity.Domain.Contracts;
using JJConsulting.Infinity.Domain.Identity.Security;
using JJConsulting.Infinity.Domain.Menu;

public sealed class OrdersMenuItemProvider : IMenuConfigurationProvider
{
    public ValueTask ConfigureAsync(MenuConfigurationBuilder builder, CancellationToken cancellationToken = default)
    {
        builder.AddFolderMenuItem(new FolderMenuItem
        {
            Id = Guid.Parse("7d92e2cb-e351-4704-a305-84027c279fbb"),
            Name = "Orders",
            Order = 1,
            Authorization = new AuthorizationData()
        }, children =>
        {
            children.AddUrlMenuItem(new UrlMenuItem
            {
                Id = Guid.Parse("62d256f3-672c-4d5e-a3cd-c5660278bbef"),
                Name = "All orders",
                Slug = "orders",
                Url = "/Orders",
                Order = 1,
                Authorization = new AuthorizationData()
            });
        });
        return ValueTask.CompletedTask;
    }
}

Both AddUrlMenuItem and AddFolderMenuItem return void. Add nested folders and links inside the optional folder lambda, which receives another MenuConfigurationBuilder. The builder sets ParentId to the containing folder's ID, or null for root items, overwriting any supplied value. Assign stable IDs before adding items. See Menu service for a nested example and flat-list navigation with MenuTree.

The token also needs the Menu permission, and the application identified by AppName must already exist in Infinity. Configure the complete, nonempty menu tree: synchronization replaces the application's menu and updates its roles from each item's authorization data. Use stable, nonempty, unique IDs. Set Roles or Users in AuthorizationData to grant menu access to non-administrators. URLs are paths within the proxied application.

See Infinity.Client.Example for a working MVC example.

Product Compatible and additional computed target framework versions.
.NET 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
2.0.0-rc.2 0 9/14/2026
2.0.0-rc.1 49 9/10/2026
1.5.0-rc.9 52 9/10/2026