Skip to content

Commit a9ccb2a

Browse files
authored
Merge pull request #5 from Black-Cockpit/updated_nuget_package_details
💯 Updated nuget package details
2 parents 72013cc + bff557f commit a9ccb2a

File tree

3 files changed

+104
-4
lines changed

3 files changed

+104
-4
lines changed

NETCore.Keycloak.Client/NETCore.Keycloak.Client.csproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@
55
A comprehensive .NET Core client library for Keycloak that provides seamless integration with Keycloak's authentication and authorization services.
66
This library offers a robust implementation of Keycloak's REST API, including support for OpenID Connect, OAuth 2.0, and User-Managed Access (UMA 2.0).
77
</Description>
8-
<PackageVersion>1.0.0</PackageVersion>
8+
<PackageVersion>1.0.1</PackageVersion>
99
<PackageId>Keycloak.NETCore.Client</PackageId>
1010
<PackageTags>keycloak;oauth2;authentication;authorization;openid-connect;oidc;oidc-provider;fapi;fapi-client;user-managed-access;financial-security</PackageTags>
1111
<PackageIcon>black_cockpit.png</PackageIcon>
12+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
13+
<RepositoryUrl>https://github.com/Black-Cockpit/NETCore.Keycloak.git</RepositoryUrl>
14+
<RepositoryType>git</RepositoryType>
15+
<PackageReadmeFile>README.md</PackageReadmeFile>
16+
<PackageProjectUrl>https://github.com/Black-Cockpit/NETCore.Keycloak</PackageProjectUrl>
1217
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
1318
<LangVersion>latest</LangVersion>
1419
<ImplicitUsings>enable</ImplicitUsings>
@@ -34,5 +39,6 @@
3439
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.33"/>
3540
<None Include="black_cockpit.png" Pack="true" PackagePath="\"/>
3641
<None Include="LICENSE" Pack="true" PackagePath="\"/>
42+
<None Include="README.md" Pack="true" PackagePath="\"/>
3743
</ItemGroup>
3844
</Project>

NETCore.Keycloak.Client/README.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# 🔐 Keycloak Client for .NET Core
2+
3+
🚀 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.
4+
5+
***
6+
7+
## ⚙️ Requirements
8+
9+
| Category | Supported Versions |
10+
| ------------ | ----------------------------------------------------------------------- |
11+
| .NET | 6.0, 7.0, 8.0 |
12+
| Dependencies | ASP.NET Core, Microsoft.Extensions.DependencyInjection, Newtonsoft.Json |
13+
14+
## ✅ Version Compatibility
15+
16+
| Keycloak Version | Support |
17+
| ---------------- | ------- |
18+
| 26.x ||
19+
| 25.x ||
20+
| 24.x ||
21+
| 23.x ||
22+
| 22.x ||
23+
| 21.x ||
24+
| 20.x ||
25+
26+
## 🌟 Key Features
27+
28+
- 🔄 Complete Keycloak REST API integration
29+
- 🛡️ Robust security with OpenID Connect and OAuth 2.0
30+
- 📊 Built-in monitoring and performance metrics
31+
- 🔍 Comprehensive error handling and debugging
32+
- 🚦 Automated token management and renewal
33+
- 👥 Advanced user and group management
34+
- 🔑 Multiple authentication flows support
35+
- 📈 Enterprise-grade scalability
36+
37+
## 💻 Installation
38+
39+
To integrate the Keycloak client library into your .NET Core application, simply add the NuGet package:
40+
41+
```bash
42+
Install-Package Keycloak.NETCore.Client
43+
```
44+
45+
## 🚀 Getting Started
46+
47+
### 📋 Prerequisites
48+
49+
- ✳️ .NET Core SDK (version 6.0 or later)
50+
- 🖥️ A running Keycloak instance
51+
- 🔑 Client credentials and realm configuration
52+
53+
### 🔧 Basic Setup
54+
55+
1. Add the Keycloak client to your services in `Program.cs` or `Startup.cs`:
56+
57+
```csharp
58+
services.AddKeycloakAuthentication(options =>
59+
{
60+
options.KeycloakBaseUrl = "http://localhost:8080";
61+
options.RealmAdminCredentials = new KcClientCredentials
62+
{
63+
ClientId = "your-client-id",
64+
ClientSecret = "your-client-secret"
65+
};
66+
});
67+
```
68+
69+
## 📖 Basic Usage
70+
71+
Here's a quick example of how to use the library:
72+
73+
```csharp
74+
// Create Keycloak client
75+
var keycloakClient = new KeycloakClient("http://localhost:8080");
76+
77+
// Authenticate
78+
var token = await keycloakClient.Auth.GetClientCredentialsTokenAsync(
79+
"your-realm",
80+
new KcClientCredentials
81+
{
82+
ClientId = "your-client-id",
83+
ClientSecret = "your-client-secret"
84+
});
85+
86+
// Use the token for other operations
87+
var users = await keycloakClient.Users.GetAsync(
88+
"your-realm",
89+
token.AccessToken,
90+
new KcUserFilter { MaxResults = 10 });
91+
```
92+
## 📄 License
93+
94+
This project is licensed under the MIT License.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<div align="center">
1313

1414
[![GitHub Build Status](https://github.com/Black-Cockpit/NETCore.Keycloak/actions/workflows/build.yml/badge.svg)](https://github.com/Black-Cockpit/NETCore.Keycloak/actions/workflows/build.yml)
15-
[![NuGet version](https://img.shields.io/nuget/v/NETCore.Keycloak.Client.svg)](https://www.nuget.org/packages/NETCore.Keycloak.Client/)
16-
[![NuGet downloads](https://img.shields.io/nuget/dt/NETCore.Keycloak.Client.svg)](https://www.nuget.org/packages/NETCore.Keycloak.Client/)
15+
[![NuGet version](https://img.shields.io/nuget/v/Keycloak.NETCore.Client.svg)](https://www.nuget.org/packages/Keycloak.NETCore.Client/)
16+
[![NuGet downloads](https://img.shields.io/nuget/dt/Keycloak.NETCore.Client.svg)](https://www.nuget.org/packages/Keycloak.NETCore.Client/)
1717
[![GitHub Stars](https://img.shields.io/github/stars/Black-Cockpit/NETCore.Keycloak)](https://github.com/Black-Cockpit/NETCore.Keycloak/stargazers)
1818
[![License](https://img.shields.io/github/license/Black-Cockpit/NETCore.Keycloak)](LICENSE)
1919

@@ -76,7 +76,7 @@
7676
To integrate the Keycloak client library into your .NET Core application, simply add the NuGet package:
7777

7878
```bash
79-
Install-Package NETCore.Keycloak
79+
Install-Package Keycloak.NETCore.Client
8080
```
8181

8282
## 🚀 Getting Started

0 commit comments

Comments
 (0)