Keycloak.Net.Core 1.0.41
![]()
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.
No packages depend on Keycloak.Net.Core.
.NET 8.0
- Flurl.Http (>= 4.0.2)
- System.IdentityModel.Tokens.Jwt (>= 8.14.0)
.NET 10.0
- Flurl.Http (>= 4.0.2)
- System.IdentityModel.Tokens.Jwt (>= 8.14.0)
| Version | Downloads | Last updated |
|---|---|---|
| 1.0.41 | 2 | 10/16/2026 |
| 1.0.40 | 1 | 10/17/2026 |
| 1.0.39 | 1 | 10/17/2026 |
| 1.0.38 | 1 | 10/17/2026 |
| 1.0.37 | 1 | 10/17/2026 |
| 1.0.36 | 1 | 10/17/2026 |
| 1.0.35 | 1 | 10/17/2026 |
| 1.0.34 | 1 | 10/17/2026 |
| 1.0.33 | 1 | 10/17/2026 |
| 1.0.32 | 1 | 10/17/2026 |
| 1.0.31 | 1 | 10/17/2026 |
| 1.0.30 | 1 | 10/17/2026 |
| 1.0.29 | 1 | 10/17/2026 |
| 1.0.28 | 1 | 10/17/2026 |
| 1.0.27 | 1 | 10/17/2026 |
| 1.0.26 | 1 | 10/17/2026 |
| 1.0.25 | 1 | 10/17/2026 |
| 1.0.23 | 1 | 10/17/2026 |
| 1.0.22 | 1 | 10/17/2026 |
| 1.0.21 | 1 | 10/17/2026 |
| 1.0.20 | 1 | 10/17/2026 |
| 1.0.19 | 1 | 10/17/2026 |