MudraX.Blazor.Keycloak.Maui
9.0.0.5
dotnet add package MudraX.Blazor.Keycloak.Maui --version 9.0.0.5
NuGet\Install-Package MudraX.Blazor.Keycloak.Maui -Version 9.0.0.5
<PackageReference Include="MudraX.Blazor.Keycloak.Maui" Version="9.0.0.5" />
<PackageVersion Include="MudraX.Blazor.Keycloak.Maui" Version="9.0.0.5" />
<PackageReference Include="MudraX.Blazor.Keycloak.Maui" />
paket add MudraX.Blazor.Keycloak.Maui --version 9.0.0.5
#r "nuget: MudraX.Blazor.Keycloak.Maui, 9.0.0.5"
#:package MudraX.Blazor.Keycloak.Maui@9.0.0.5
#addin nuget:?package=MudraX.Blazor.Keycloak.Maui&version=9.0.0.5
#tool nuget:?package=MudraX.Blazor.Keycloak.Maui&version=9.0.0.5
MudraX.Blazor.Keycloak.Maui
MudraX.Blazor.Keycloak.Maui is a robust library designed to integrate Keycloak authentication seamlessly into Blazor and .NET MAUI applications. Built with .NET 9, this library is optimized for modern cross-platform development, enabling developers to implement secure and scalable authentication solutions with ease.
Features
- Simplified integration with Keycloak for Blazor and .NET MAUI projects.
- Cross-platform support for Android, iOS, Windows, and macOS.
- Pre-built components for user authentication and session management.
- Flexible configuration options for different environments (e.g., development, production).
Installation
To install the library, use the following NuGet command:
Install-Package MudraX.Blazor.Keycloak.Maui
Usage
MauiProgram.cs
builder.Services.AddMudraBlazorServices(supportedCultures: ["en-US", "zh-TW"]);
#if ANDROID
builder.Services.AddMudraKeycloakServices(options =>
{
options.TokenUrl = "http://10.0.2.2:8080/realms/my-realm/protocol/openid-connect/token";
options.ClientId = "<clientid>";
options.ClientSecret = "<client-secret>";
});
#else
builder.Services.AddMudraKeycloakServices(options =>
{
options.TokenUrl = "http://localhost:8080/realms/my-realm/protocol/openid-connect/token";
options.ClientId = "<clientid>";
options.ClientSecret = "<client-secret>";
});
#endif
_Imports.razor
@using MudraX.Blazor.Keycloak.Maui.Components.Layout
MainLayout.razor
Add AppUserMenu to MainLayout.razor
<ApplicationLayout>
<ApplcationBar>
<AppUserMenu />
</ApplcationBar>
Routes.razor
Add the following route to your Routes.razor file:
<Router AppAssembly="@typeof(MauiProgram).Assembly" AdditionalAssemblies="new[] { typeof(AppUserMenu).Assembly }">
Contributing
Contributions are welcome! To get started:
- Fork the repository and create a new branch for your feature or bug fix.
- Follow the contribution guidelines for detailed instructions.
- Submit a pull request with a clear description of your changes.
For any questions or discussions, feel free to open an issue or join our community forums.
License
This project is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net9.0
- Microsoft.AspNetCore.Components.Web (>= 9.0.11)
- Microsoft.AspNetCore.WebUtilities (>= 9.0.11)
- MudraX.Blazor.Maui (>= 9.0.0.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.