KeycloakRestClient 26.3.2
dotnet add package KeycloakRestClient --version 26.3.2
NuGet\Install-Package KeycloakRestClient -Version 26.3.2
<PackageReference Include="KeycloakRestClient" Version="26.3.2" />
<PackageVersion Include="KeycloakRestClient" Version="26.3.2" />
<PackageReference Include="KeycloakRestClient" />
paket add KeycloakRestClient --version 26.3.2
#r "nuget: KeycloakRestClient, 26.3.2"
#:package KeycloakRestClient@26.3.2
#addin nuget:?package=KeycloakRestClient&version=26.3.2
#tool nuget:?package=KeycloakRestClient&version=26.3.2
KeycloakRestClient for C#
A C# client library for Keycloak Admin REST API, automatically generated from official Keycloak Admin OpenAPI specifications using NSwag. This library uses System.Text.Json for JSON serialization and supports multiple .NET frameworks.
Features
- Auto-generated from Official OpenAPI Specs: Built directly from Keycloak's official Admin API OpenAPI JSON specifications
- System.Text.Json Support: Uses the modern System.Text.Json library for high-performance JSON serialization
- Multi-framework Support: Targets .NET Standard 2.0, .NET 8.0, and .NET 9.0
- Version Synchronization: Library version matches the corresponding Keycloak version
- Complete API Coverage: Includes all Keycloak Admin API endpoints and operations
Installation
dotnet add package KeycloakRestClient
Supported Frameworks
- .NET Standard 2.0
- .NET 8.0
- .NET 9.0
Usage
using KeycloakRestClient;
// Create client instance
var client = new KeycloakClient(httpClient);
// Use the client to interact with Keycloak Admin API
// (Add specific usage examples based on your implementation)
Library Generation Process
This library is generated using the following automated process:
Obtain OpenAPI JSON
Get the OpenAPI JSON specification from the Keycloak Documentation Archive based on your desired Keycloak version (available for version 24 and above). Navigate to your target version → API Documentation → Administration REST API → find "OpenAPI definition in JSON format".
Prerequisites
Install the NSwag CLI tool globally:
dotnet tool install --global NSwag.ConsoleCore
Generation Command
nswag openapi2csclient /input:openapi.json /output:KeycloakClient.cs /namespace:KeycloakRestClient /className:KeycloakClient /jsonLibrary:SystemTextJson
Project Configuration
The library targets multiple frameworks:
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
Dependencies
<PackageReference Include="System.Text.Json" Version="4.7.2" />
Versioning
Important: The version of this library is synchronized with the corresponding Keycloak version. For example:
- Library version 21.x.x corresponds to Keycloak 21.x.x
- Library version 22.x.x corresponds to Keycloak 22.x.x
This ensures API compatibility and feature alignment with your Keycloak server version. ersion alignment between your Keycloak server and this client library.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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 is compatible. 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 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.Text.Json (>= 4.7.2)
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
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 |
|---|