Keycloak.Net.Core
1.0.29
See the version list below for details.
dotnet add package Keycloak.Net.Core --version 1.0.29
NuGet\Install-Package Keycloak.Net.Core -Version 1.0.29
<PackageReference Include="Keycloak.Net.Core" Version="1.0.29" />
paket add Keycloak.Net.Core --version 1.0.29
#r "nuget: Keycloak.Net.Core, 1.0.29"
// Install Keycloak.Net.Core as a Cake Addin #addin nuget:?package=Keycloak.Net.Core&version=1.0.29 // Install Keycloak.Net.Core as a Cake Tool #tool nuget:?package=Keycloak.Net.Core&version=1.0.29
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 support only
- updated for keycloak version 25+
- added support for changing default
AdminClientId
which has defaultadmin-cli
value - 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 6.x
See documentation at https://www.keycloak.org/docs-api/6.0/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
In order to run the tests, all it's needed is to have a running instance of Keycloak with (preferably) the master
realm credentials admin/admin (as it's currently configured in the /test/Keycloak.Net.Core.Tests/appsettings.json
) and create a new realm Insurance
by importing the file in /test/insurance-real-export.json
, which also has its admin user with the same credentials as mentioned before.
Then it's just as easy as running the tests.
If for some reason you want to change the credentials, you need to make sure both realms have the same user and password as the tests use the same credentials for both master
and Insurance
realms.
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. |
-
net8.0
- Flurl.Http (>= 4.0.2)
- Microsoft.CSharp (>= 4.7.0)
- System.Net.Http (>= 4.3.4)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Keycloak.Net.Core:
Package | Downloads |
---|---|
MedCard.Client
Package Description |
|
Ai4c.IdentityService.Application
Package Description |
|
Codehard.IdentityProvider.Keycloak
A client library for Codehard's Identity Provider with Keycloak as a provider. |
|
Eliassen.Keycloak
Package Description |
|
Gte.Abp.Keycloak
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
|