Alanta.Aspire.Hosting.EasyAuthProxy 2.1.0

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

Alanta.Aspire.Hosting.EasyAuthProxy

An Aspire hosting extension for EasyAuth Dev Proxy, enabling easy local development of Azure Container Apps with EasyAuth authentication simulation.

Installation

<PackageReference Include="Alanta.Aspire.Hosting.EasyAuthProxy" Version="x.y.z" />

Or, for local development against this repo:

<ProjectReference Include="path/to/Alanta.Aspire.Hosting.EasyAuthProxy.csproj" IsAspireProjectResource="false" />

Usage

Basic Setup

var builder = DistributedApplication.CreateBuilder(args);

var catalogService = builder.AddProject<Projects.CatalogService>("catalog");

// Add EasyAuth proxy with fluent configuration
var easyAuthProxy = builder.AddEasyAuthProxy("easyauth")
    .WithBackend(catalogService)
    .WithHostPort(8888);

builder.Build().Run();

API Reference

AddEasyAuthProxy(string name)

Adds the EasyAuth development proxy as a plain .NET process. This is the default and recommended way to add it: the proxy binaries are bundled inside this package, so it only needs a matching .NET runtime on the host - no Docker or Podman required, and no image to pull.

AddEasyAuthProxyContainer(string name)

Adds the proxy as a container resource instead, pulled from ghcr.io/alanta/easyauthdevproxy. Use this if you specifically want container-based isolation; it requires Docker or Podman.

WithBackend<TResource>(IResourceBuilder<TResource> backend)

Configures the proxy to forward requests to the specified backend service using Aspire's service discovery. Works with both AddEasyAuthProxy and AddEasyAuthProxyContainer.

WithHostPort<TResource>(int? port)

Configures the host port for the proxy. Works with both AddEasyAuthProxy and AddEasyAuthProxyContainer.

How it Works

  1. Service Discovery: The proxy automatically discovers your backend services using Aspire's built-in service discovery
  2. Authentication Simulation: Provides a login form where you can configure user identity and roles
  3. Header Injection: Injects the appropriate EasyAuth headers into requests forwarded to your backend
  4. Seamless Integration: Works with any backend that supports Azure Container Apps EasyAuth

Requirements

  • .NET 10.0 runtime (for AddEasyAuthProxy) - already true for anyone running an Aspire AppHost
  • Aspire 9.4.0+
  • Docker or Podman, only if you opt into AddEasyAuthProxyContainer

Third-party notices

AddEasyAuthProxy bundles a published build of the EasyAuth proxy, including its third-party dependencies (Yarp, OpenTelemetry, Azure.Core, etc.), so it can run without a separate download. Those dependencies are redistributed under their original MIT / Apache-2.0 licenses - see THIRD-PARTY-NOTICES.txt for the full list and license texts.

Contributing

This is part of the EasyAuth Dev Proxy project. Please see the main repository for contribution guidelines.

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.3.0 1,722 8/20/2026
2.2.0 113 8/18/2026
2.1.0 109 8/14/2026