MudraX.XAF.ADFS.Blazor
24.2.8.2
dotnet add package MudraX.XAF.ADFS.Blazor --version 24.2.8.2
NuGet\Install-Package MudraX.XAF.ADFS.Blazor -Version 24.2.8.2
<PackageReference Include="MudraX.XAF.ADFS.Blazor" Version="24.2.8.2" />
<PackageVersion Include="MudraX.XAF.ADFS.Blazor" Version="24.2.8.2" />
<PackageReference Include="MudraX.XAF.ADFS.Blazor" />
paket add MudraX.XAF.ADFS.Blazor --version 24.2.8.2
#r "nuget: MudraX.XAF.ADFS.Blazor, 24.2.8.2"
#:package MudraX.XAF.ADFS.Blazor@24.2.8.2
#addin nuget:?package=MudraX.XAF.ADFS.Blazor&version=24.2.8.2
#tool nuget:?package=MudraX.XAF.ADFS.Blazor&version=24.2.8.2
MudraX.XAF.ADFS.Blazor
SSO.ADFS.Blazor module for Devexpress XAF
make sure startup uri launchSetting.json is equate ADFS Server
Upgrade the package System.IdentityModel.Tokens.Jwt referenced in the Module and Blazor projects from the original 6.* to 8.* https://github.com/openiddict/openiddict-core/issues/2033
Add reference to SSO.Keycloak.Blazor
Add Microsoft.AspNetCore.Authentication.OpenIdConnect Nuget
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.*" />
Blazor.Server
Add in BlazorApplication.cs
protected override List<Controller> CreateLogonWindowControllers() { var result = base.CreateLogonWindowControllers(); result.Add(new AdditionalLogonActionsCustomizationController()); return result; } public override void LogOff() { base.LogOff(); var navigationManager = this.ServiceProvider.GetRequiredService<NavigationManager>(); navigationManager.NavigateTo("Account/Logout", forceLoad: true); }
Set launchSettings.json with same Keycloak client settings. ex: https://localhost:7282
Add in appsettings.json
"ADFS": { "ClientId": "83af3b6f-bf17-42bd-90e7-45de9de4d49b", "MetadataAddress": "https://adfs.xxx.com.tw/adfs/.well-known/openid-configuration", "Authority": "https://adfs.xxx.com.tw/adfs", "PostLogoutRedirectUri": "https://localhost:5001/", "Scope": "openid profile email name" //Scope data=> https://openid.net/specs/openid-connect-core-1_0.html#IANA }
Set Startup.cs
- Add the following in builder.Security section
.... .AddPasswordAuthentication(options => { options.IsSupportChangePassword = true; }) .AddAuthenticationProvider<ADFSAuthenticationProvider>();
- Add the following in authentication section
authentication.AddOpenIdConnect(options => { Configuration.Bind("ADFS", options); });
- Add the following in app.UseEndpoints section
.... endpoints.MapGet("/Account/Logout", async context => { if (context.User.Identity.AuthenticationType == "AuthenticationTypes.Federation") await context.SignOutAsync(OpenIdConnectDefaults.AuthenticationScheme); await context.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme, new AuthenticationProperties { RedirectUri = "/" }); }).RequireAuthorization(); endpoints.MapControllers();
Web API - Not work
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
- DevExpress.ExpressApp (>= 24.2.8)
- DevExpress.ExpressApp.Blazor (>= 24.2.8)
- DevExpress.ExpressApp.CodeAnalysis (>= 24.2.8)
- DevExpress.ExpressApp.Xpo (>= 24.2.8)
- DevExpress.Persistent.Base (>= 24.2.8)
- DevExpress.Persistent.BaseImpl.Xpo (>= 24.2.8)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 8.0.20)
- Microsoft.AspNetCore.Authentication.OpenIdConnect (>= 8.0.20)
- Microsoft.IdentityModel.Protocols.OpenIdConnect (>= 8.14.0)
- MudraX.XAF.ADFS (>= 24.2.8.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.