| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
🚀 A powerful and feature-rich .NET Core client library for Keycloak that simplifies integration with Keycloak's authentication and authorization services. This enterprise-ready library provides a comprehensive implementation of Keycloak's REST API, with full support for OpenID Connect, OAuth 2.0, and User-Managed Access (UMA 2.0) protocols.
| Category | Supported Versions |
|---|---|
| .NET | 8.0, 9.0, 10.0 |
| Dependencies | ASP.NET Core, Microsoft.Extensions.DependencyInjection, Newtonsoft.Json |
| Keycloak Version | Support |
|---|---|
| 26.x | ✅ |
| 25.x | ✅ |
| 24.x | ✅ |
Note: Keycloak versions 20.x through 23.x and .NET 6.0/7.0 were supported in previous releases (v1.x). If you need support for these older versions, please use v1.0.2.
To integrate the Keycloak client library into your .NET Core application, simply add the NuGet package:
Install-Package Keycloak.NETCore.Clientservices.AddKeycloakAuthentication(options =>
{
options.KeycloakBaseUrl = "http://localhost:8080";
options.RealmAdminCredentials = new KcClientCredentials
{
ClientId = "your-client-id",
ClientSecret = "your-client-secret"
};
});Here's a quick example of how to use the library:
// Create Keycloak client
var keycloakClient = new KeycloakClient("http://localhost:8080");
// Authenticate
var token = await keycloakClient.Auth.GetClientCredentialsTokenAsync(
"your-realm",
new KcClientCredentials
{
ClientId = "your-client-id",
ClientSecret = "your-client-secret"
});
// Use the token for other operations
var users = await keycloakClient.Users.GetAsync(
"your-realm",
token.AccessToken,
new KcUserFilter { Max = 10 });Explore our comprehensive documentation for each module:
Our library includes an extensive test suite ensuring reliability across multiple Keycloak versions (20.x through 26.x). The testing infrastructure leverages Docker and Ansible for automated setup and execution.
Version Coverage:
Test Categories:
Infrastructure:
# Install test environment dependencies
cd NETCore.Keycloak.Client.Tests
make install_virtual_env
# Run tests for all supported versions
dotnet cake e2e_test.cakeThanks to all the people who contribute to this project!
Want to see your avatar here? Check our Contributing Guidelines!
This project is licensed under the MIT License - see the LICENSE file for details.
We welcome contributions from the community! Please check our Contributing Guidelines for details on:
⭐ Star us on GitHub | 📫 Report Issues | 📚 Read the Docs
| Back | FazBrowse Home | New Git URL |