Skip to main content
net8.0

Keycloak support for .NET Aspire.

Published
Oct 24, 2024
2y ago
Total Downloads
1.1M
1,146,741

Deprecated Package Version

Reason: Other, Legacy

This version is out of support and is no longer maintained. Please upgrade to the latest version. See our support policy for details: https://aka.ms/dotent/aspire/support

Install

dotnet add package Aspire.Hosting.Keycloak --version 8.2.2-preview.1.24521.5
ProductVersions
.NET
net8.0

README

Aspire.Hosting.Keycloak library

Provides extension methods and resource definitions for a .NET Aspire AppHost to configure a Keycloak resource.

Getting started

Install the package

In your AppHost project, install the .NET Aspire Keycloak Hosting library with NuGet:

dotnet add package Aspire.Hosting.Keycloak

Usage example

Then, in the Program.cs file of AppHost, add a Keycloak resource and enable service discovery using the following methods:

var keycloak = builder.AddKeycloak("keycloak", 8080);

var myService = builder.AddProject<Projects.MyService>()
                       .WithReference(keycloak);

Recommendation: For local development use a stable port for the Keycloak resource (8080 in the example above). It can be any port, but it should be stable to avoid issues with browser cookies that will persist OIDC tokens (which include the authority URL, with port) beyond the lifetime of the AppHost.

Feedback & contributing

https://github.com/dotnet/aspire

Changes from Previous Version

v8.2.1-preview.1.24473.4v8.2.2-preview.1.24521.5
Removed Dependencies

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.NuGet marks this package as deprecated. Review the publisher's migration guidance before adopting it.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.The published metadata declares 16 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.