Keycloak.Net.Core
1.0.40
See the version list below for details.
dotnet add package Keycloak.Net.Core --version 1.0.40
NuGet\Install-Package Keycloak.Net.Core -Version 1.0.40
<PackageReference Include="Keycloak.Net.Core" Version="1.0.40" />
<PackageVersion Include="Keycloak.Net.Core" Version="1.0.40" />
<PackageReference Include="Keycloak.Net.Core" />
paket add Keycloak.Net.Core --version 1.0.40
#r "nuget: Keycloak.Net.Core, 1.0.40"
#:package Keycloak.Net.Core@1.0.40
#addin nuget:?package=Keycloak.Net.Core&version=1.0.40
#tool nuget:?package=Keycloak.Net.Core&version=1.0.40
![]()
Keycloak.Net.Core
A Fork of https://github.com/lvermeulen/Keycloak.Net with some additional patches
- allow usage of CancellationTokens
- changed ClientConfig to Dictionary<string, string>
- removed signing
- .NET 8 and .NET 10 support only
- updated for keycloak version 26+
- added support for changing default
AdminClientIdwhich has defaultadmin-clivalue - added support for System.Text.Json in replacement of NewtonsoftJson.
To use different AdminClientId, use newly introduced KeyCloakOptions:
new KeycloakClient(
"http://keycloak.url",
"adminUserName",
"adminPassword",
new KeycloakOptions(adminClientId:"admin"
)
);
Older version support for using /auth path
When creating a new KeycloakClient, use newly introduced KeycloakOptions:
new KeycloakClient(
"http://keycloak.url",
"adminUserName",
"adminPassword",
new KeycloakOptions(prefix:"auth"
)
);
C# client for Keycloak 26.x
See documentation at https://www.keycloak.org/docs-api/latest/rest-api/
Features
- Attack Detection
- Authentication Management
- Client Attribute Certificate
- Client Initial Access
- Client Registration Policy
- Client Role Mappings
- Client Scopes
- Clients
- Component
- Groups
- Identity Providers
- Key
- Protocol Mappers
- Realms Admin
- Role Mapper
- Roles
- Roles (by ID)
- Scope Mappings
- User Storage Provider
- Users
- Root
Testing
The easiest way to run the tests is to use the fixture launcher:
./build/start-keycloak.sh --test --auto-cleanup
This starts Keycloak 26.7.0 in Docker, imports /test/keycloak-net-fixture-realm-export.json, runs the tests, and removes the container when the run completes.
To start the fixture server without running tests:
./build/start-keycloak.sh
The fixture realm is keycloak-net-fixture. The tests use the credentials in /test/Keycloak.Net.Core.Tests/appsettings.json; the fixture export includes the matching realm admin user.
If you prefer to run Keycloak manually, import /test/keycloak-net-fixture-realm-export.json into a Keycloak 26.7.0 instance before running the tests. The imported realm must be available at keycloak-net-fixture, and the credentials in /test/Keycloak.Net.Core.Tests/appsettings.json must match the realm admin user included in the export.
| Product | Versions 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 was computed. 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. |
-
net10.0
- Flurl.Http (>= 4.0.2)
- System.IdentityModel.Tokens.Jwt (>= 8.14.0)
-
net8.0
- Flurl.Http (>= 4.0.2)
- System.IdentityModel.Tokens.Jwt (>= 8.14.0)
NuGet packages (11)
Showing the top 5 NuGet packages that depend on Keycloak.Net.Core:
| Package | Downloads |
|---|---|
|
HTL.Infrastructure.KeyCloak
Package Description |
|
|
HTL.Application
Package Description |
|
|
NetEvolve.HealthChecks.Keycloak
Contains HealthChecks for the Keycloak service, based on the nuget package `Keycloak.Net.Core`. |
|
|
MedCard.Client
Package Description |
|
|
Ai4c.IdentityService.Application
Package Description |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Keycloak.Net.Core:
| Repository | Stars |
|---|---|
|
testcontainers/testcontainers-dotnet
A library to support tests with throwaway instances of Docker containers for all compatible .NET Standard versions.
|
|
|
abpframework/eShopOnAbp
Reference microservice solution built with the ABP Framework and .NET, runs on Kubernetes with Helm configuration, includes API Gateways, Angular and ASP.NET Core MVC applications, PostgreSQL and MongoDB databases
|
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.41 | 11,733 | 9/15/2026 |
| 1.0.40 | 25,088 | 7/16/2026 |
| 1.0.39 | 94,188 | 4/30/2026 |
| 1.0.38 | 177,727 | 11/20/2025 |
| 1.0.37 | 32,810 | 10/31/2025 |
| 1.0.36 | 12,935 | 10/1/2025 |
| 1.0.35 | 13,661 | 9/3/2025 |
| 1.0.34 | 298,831 | 4/11/2025 |
| 1.0.33 | 65,158 | 1/31/2025 |
| 1.0.32 | 38,074 | 1/6/2025 |
| 1.0.31 | 65,027 | 12/4/2024 |
| 1.0.30 | 63,243 | 10/4/2024 |
| 1.0.29 | 53,390 | 9/23/2024 |
| 1.0.28 | 38,546 | 8/19/2024 |
| 1.0.27 | 48,554 | 7/30/2024 |
| 1.0.26 | 266,097 | 4/23/2024 |
| 1.0.25 | 10,474 | 3/28/2024 |
| 1.0.23 | 1,329 | 3/26/2024 |
| 1.0.22 | 171,668 | 8/29/2023 |