From 431cde30182ee3a1cbd9beb2edc107931a22495d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Can=20Karag=C3=B6z?= Date: Tue, 20 Oct 2026 22:19:42 +0300 Subject: [PATCH 1/2] test(samples): add Blazor-native authorization examples --- .../{Page => Custom}/NotAuthorized.razor | 0 .../{Page => Custom}/NotAuthorized.razor.cs | 2 +- .../Custom/SampleAuthorizationResult.razor | 66 ++++++ .../Components/Custom/SampleMatchModes.razor | 192 ++++++++++++++++++ .../Components/Custom/SampleStateView.razor | 130 ++++++++++++ .../Components/Layout/SampleMainLayout.razor | 44 ++++ .../Page/SampleAuthorizedTestPage.razor | 30 --- .../Components/SampleRoutes.razor | 4 +- .../_Imports.razor | 4 + .../uauthhub.db-shm | Bin 32768 -> 32768 bytes .../uauthhub.db-wal | Bin 927032 -> 1207192 bytes .../Components/Pages/AnonymousTestPage.razor | 1 - .../AdminPermissionPage.razor | 6 + .../AuthorizationLab/AdminRolePage.razor | 5 + .../AspNetAuthorizePage.razor | 5 + .../AuthorizationLab/AuthenticatedPage.razor | 5 + .../CombinedAuthorizationPage.razor | 8 + .../AuthorizationLab/MatchModesPage.razor | 4 + .../Pages/AuthorizationLab/PublicPage.razor | 5 + .../AuthorizationLab/StateViewPage.razor | 4 + .../Components/Pages/AuthorizedTestPage.razor | 4 - .../Components/_Imports.razor | 1 + .../AdminPermissionPage.razor | 6 + .../AuthorizationLab/AdminRolePage.razor | 5 + .../AspNetAuthorizePage.razor | 5 + .../AuthorizationLab/AuthenticatedPage.razor | 5 + .../CombinedAuthorizationPage.razor | 8 + .../AuthorizationLab/MatchModesPage.razor | 4 + .../AuthorizationLab/PublicPage.razor | 5 + .../AuthorizationLab/StateViewPage.razor | 4 + .../Components/Pages/AnonymousTestPage.razor | 1 - .../AdminPermissionPage.razor | 6 + .../AuthorizationLab/AdminRolePage.razor | 5 + .../AspNetAuthorizePage.razor | 5 + .../AuthorizationLab/AuthenticatedPage.razor | 5 + .../CombinedAuthorizationPage.razor | 8 + .../AuthorizationLab/MatchModesPage.razor | 4 + .../Pages/AuthorizationLab/PublicPage.razor | 5 + .../AuthorizationLab/StateViewPage.razor | 4 + .../Components/Pages/AuthorizedTestPage.razor | 4 - .../Pages/AnonymousTestPage.razor | 1 - .../AdminPermissionPage.razor | 6 + .../AuthorizationLab/AdminRolePage.razor | 5 + .../AspNetAuthorizePage.razor | 5 + .../AuthorizationLab/AuthenticatedPage.razor | 5 + .../CombinedAuthorizationPage.razor | 8 + .../AuthorizationLab/MatchModesPage.razor | 4 + .../Pages/AuthorizationLab/PublicPage.razor | 5 + .../AuthorizationLab/StateViewPage.razor | 4 + .../Pages/AuthorizedTestPage.razor | 4 - .../_Imports.razor | 1 + .../Pages/AnonymousTestPage.razor | 1 - .../AdminPermissionPage.razor | 6 + .../AuthorizationLab/AdminRolePage.razor | 5 + .../AspNetAuthorizePage.razor | 5 + .../AuthorizationLab/AuthenticatedPage.razor | 5 + .../CombinedAuthorizationPage.razor | 8 + .../AuthorizationLab/MatchModesPage.razor | 4 + .../Pages/AuthorizationLab/PublicPage.razor | 5 + .../AuthorizationLab/StateViewPage.razor | 4 + .../Pages/AuthorizedTestPage.razor | 4 - .../_Imports.razor | 1 + 62 files changed, 653 insertions(+), 52 deletions(-) rename samples/CodeBeam.UltimateAuth.Sample.Shared/Components/{Page => Custom}/NotAuthorized.razor (100%) rename samples/CodeBeam.UltimateAuth.Sample.Shared/Components/{Page => Custom}/NotAuthorized.razor.cs (82%) create mode 100644 samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/SampleAuthorizationResult.razor create mode 100644 samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/SampleMatchModes.razor create mode 100644 samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/SampleStateView.razor delete mode 100644 samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Page/SampleAuthorizedTestPage.razor delete mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AnonymousTestPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/AdminPermissionPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/AdminRolePage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/AspNetAuthorizePage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/AuthenticatedPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/CombinedAuthorizationPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/MatchModesPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/PublicPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/StateViewPage.razor delete mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizedTestPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AdminPermissionPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AdminRolePage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AspNetAuthorizePage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AuthenticatedPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/CombinedAuthorizationPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/MatchModesPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/PublicPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/StateViewPage.razor delete mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AnonymousTestPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/AdminPermissionPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/AdminRolePage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/AspNetAuthorizePage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/AuthenticatedPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/CombinedAuthorizationPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/MatchModesPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/PublicPage.razor create mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/StateViewPage.razor delete mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizedTestPage.razor delete mode 100644 samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AnonymousTestPage.razor create mode 100644 samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/AdminPermissionPage.razor create mode 100644 samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/AdminRolePage.razor create mode 100644 samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/AspNetAuthorizePage.razor create mode 100644 samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/AuthenticatedPage.razor create mode 100644 samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/CombinedAuthorizationPage.razor create mode 100644 samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/MatchModesPage.razor create mode 100644 samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/PublicPage.razor create mode 100644 samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/StateViewPage.razor delete mode 100644 samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizedTestPage.razor delete mode 100644 samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AnonymousTestPage.razor create mode 100644 samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/AdminPermissionPage.razor create mode 100644 samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/AdminRolePage.razor create mode 100644 samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/AspNetAuthorizePage.razor create mode 100644 samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/AuthenticatedPage.razor create mode 100644 samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/CombinedAuthorizationPage.razor create mode 100644 samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/MatchModesPage.razor create mode 100644 samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/PublicPage.razor create mode 100644 samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/StateViewPage.razor delete mode 100644 samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizedTestPage.razor diff --git a/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Page/NotAuthorized.razor b/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/NotAuthorized.razor similarity index 100% rename from samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Page/NotAuthorized.razor rename to samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/NotAuthorized.razor diff --git a/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Page/NotAuthorized.razor.cs b/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/NotAuthorized.razor.cs similarity index 82% rename from samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Page/NotAuthorized.razor.cs rename to samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/NotAuthorized.razor.cs index eb018194..6142f36a 100644 --- a/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Page/NotAuthorized.razor.cs +++ b/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/NotAuthorized.razor.cs @@ -1,4 +1,4 @@ -namespace CodeBeam.UltimateAuth.Sample.Shared.Components.Page; +namespace CodeBeam.UltimateAuth.Sample.Shared.Components.Custom; public partial class NotAuthorized { diff --git a/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/SampleAuthorizationResult.razor b/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/SampleAuthorizationResult.razor new file mode 100644 index 00000000..11d5faf7 --- /dev/null +++ b/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/SampleAuthorizationResult.razor @@ -0,0 +1,66 @@ +@inject NavigationManager Nav + + + + + + + + + + @(Public ? "Public Access" : "Access Granted") + @Description + + + + + + Scenario + @Title + + + + Authorization + @(Public ? "Public" : "Authorized") + + + + + + + + + + + REQUIREMENT + + + + + @Requirement + + + + + + + Back to Home + + + + + + +@code { + [Parameter, EditorRequired] + public string Title { get; set; } = default!; + + [Parameter] + public string Description { get; set; } = "You have successfully accessed this protected page."; + + [Parameter] + public bool Public { get; set; } + + [Parameter, EditorRequired] + public string Requirement { get; set; } = default!; +} diff --git a/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/SampleMatchModes.razor b/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/SampleMatchModes.razor new file mode 100644 index 00000000..c1198861 --- /dev/null +++ b/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/SampleMatchModes.razor @@ -0,0 +1,192 @@ +@using CodeBeam.UltimateAuth.Core.Contracts +@using CodeBeam.UltimateAuth.Core.Defaults + + + + + + + + + + + + Authorization Match Modes + + + + Compare how Category, Any, and All evaluate the same requirements. + + + + + + + Requirements + + + + Roles: Admin, Manager, User + + + + Permission: @UAuthActions.Users.QueryAdmin + + + + + + + + + + + + Category + + + + One matching role AND the permission. + + + + + + + + + Authorized + + + + + + Denied + + + + + + + + + + + + + + + + + + + Any + + + + One matching role OR the permission. + + + + + + + + + Authorized + + + + + + Denied + + + + + + + + + + + + + + + + + + + All + + + + Both roles AND the permission. + + + + + + + + + Authorized + + + + + + Denied + + + + + + + + + + + + + + + + + Back to Home + + + + + diff --git a/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/SampleStateView.razor b/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/SampleStateView.razor new file mode 100644 index 00000000..1a3618c9 --- /dev/null +++ b/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Custom/SampleStateView.razor @@ -0,0 +1,130 @@ +@using CodeBeam.UltimateAuth.Core.Defaults + + + + + + + + + + + + + UAuthStateView + + + + This page is public. Each section evaluates its own authorization requirements. + + + + + + + + + Authenticated User + + + + No role or permission required. + + + + + + + Welcome, @state.Identity?.DisplayName! + + + + + + Authentication required. + + + + + + + + + + + + + + Admin Role + + + + Roles = Admin + + + + + + + Admin role granted. + + + + + + Admin role required. + + + + + + + + + + + + + + Admin Permission + + + + @UAuthActions.Users.QueryAdmin + + + + + + + Admin permission granted. + + + + + + Admin permission required. + + + + + + + + + + Back to Home + + + + + diff --git a/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Layout/SampleMainLayout.razor b/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Layout/SampleMainLayout.razor index 4d367b16..569f765f 100644 --- a/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Layout/SampleMainLayout.razor +++ b/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Layout/SampleMainLayout.razor @@ -11,6 +11,50 @@ + + + + + Authorization Lab + + + + + + + + Authorization Lab + + + + Explore route and UI authorization. + + + + + ROUTE PROTECTION + + + + + + + + + AUTHORIZATION MODELS + + + + + + + + COMPONENT AUTHORIZATION + + + + + diff --git a/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Page/SampleAuthorizedTestPage.razor b/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Page/SampleAuthorizedTestPage.razor deleted file mode 100644 index 20d3062f..00000000 --- a/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/Page/SampleAuthorizedTestPage.razor +++ /dev/null @@ -1,30 +0,0 @@ -@using CodeBeam.UltimateAuth.Core.Defaults -@inherits UAuthPageBase - - - - - - - Everything is Ok - - - If you see this section, it means you succesfully logged in. - - - - Go Home Page - - - - - - This is admin view content. - - - - UltimateAuth protects this resource based on your session and permissions. - - - - diff --git a/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/SampleRoutes.razor b/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/SampleRoutes.razor index 278fb57d..78794152 100644 --- a/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/SampleRoutes.razor +++ b/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/SampleRoutes.razor @@ -36,7 +36,9 @@ *@ - + + + diff --git a/samples/CodeBeam.UltimateAuth.Sample.Shared/_Imports.razor b/samples/CodeBeam.UltimateAuth.Sample.Shared/_Imports.razor index 7309978c..fecf3334 100644 --- a/samples/CodeBeam.UltimateAuth.Sample.Shared/_Imports.razor +++ b/samples/CodeBeam.UltimateAuth.Sample.Shared/_Imports.razor @@ -6,6 +6,10 @@ @using CodeBeam.UltimateAuth.Client.Runtime @using CodeBeam.UltimateAuth.Client.Diagnostics @using CodeBeam.UltimateAuth.Client.Blazor +@using CodeBeam.UltimateAuth.Core.Contracts +@using CodeBeam.UltimateAuth.Core.Defaults +@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom +@using Microsoft.AspNetCore.Authorization @using MudBlazor @using MudExtensions diff --git a/samples/UAuthHub/CodeBeam.UltimateAuth.Sample.UAuthHub.EFCore/uauthhub.db-shm b/samples/UAuthHub/CodeBeam.UltimateAuth.Sample.UAuthHub.EFCore/uauthhub.db-shm index 87c20d78256897cc37327ca34eb3a891e3c2def8..5eaf9289a82469e4c3a26727f02ceb7588b20cfe 100644 GIT binary patch delta 678 zcmb7h!yJvgdK}q0k;t`m`~<|G~hy&hF$yN%Q~a^=y42Ja>M{F)prmU9`Pi z7I|EiT-99LA#hqFp9ye6gHz zQ}Edi-*PlKE$4RnVg+qTfhV=TGmbQhny%ShzR09J1J%&(1c@x#n350oR*?M;pLonw z*;6NkN1F`Fh~OSZ@eA3MuLpI@wtW}u_xP-%?pBOoB}Gg$l#l!P&3>Ocwf}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-v}ANqF}QZDTlT{%H7U>SA2+^qu>#L-TAskv=YO^g z>DV#^cK7r0J2=F?Tzd;_imf!kR>FgM31GY9QSYy^TQr-S9a#40 zM9_LIu?-duHN(Q8ZowFDKpUu=lao~abC#9V?bkZ}QQb50{{D@-i@R&{L`*$7-zr|` z8ynsw-$AeEPX%@Ps3ObvkISyPUvw6{o(IV~uM`GRCR-0@JZ|>N0uyWjlzbM(%{1k7 zj*6Ey59-XTth@yVH&TmdI-;h0GoyIc#%KNe0-p+00zvkjz|hKZmq1t*O74E#L787o zuWrsIo%LR64N$vuzmm+AHe1#cN{4wu`JADAZ9d4i1he+;{M+LF8C3?}y}Rj)?_|E9 zr~#GP{2PV2>DBvfca&NqvGPW>BGhip{be66<>I{b)EUW*?S1E$H7m60nAvIGt7E5u z3az%|W|}oC1bb*dwM&?_*Y9cc&r$xY{cxgmu4W;4K%i<)aDBFMcOqzO=R0yo=H z-gjFMP#}Y3U5+Dsmh3MetIjp&xY;JyY`Ep7VS!^ztxVwkg|_nW6qJl2Wisu-Stf>U z7@X}( zZeYrPys-9#p59B-?6za$>Uv+9`d(l=R}(u|D6oUw;OR-GjwbP1k)s8l_Y3SBX{kMO|8G(w1Kwm*R?LA zF1y}Ya+=I&4!9uW0#5IZ=ZZcrCH?MsI)bo6=zeljzDW@cS@9J}IFFLgz3TO&CONjO zRs4cciNj)Ud7BXh*V)1j*+BBi;MeFRO_h59+j7F~? z=R3xO8ZTSp!z~OIyik35%=tlKk=k*HDR$WeyR3=bdK%;Sn0J<1s>uYtW4B*99R8}_ zBUFboE~YQ0B!*WiQ2pv&?XDOpn->Jy_qDxpFV6g_{qKb8?=koRl2Qm{$@#SO`>bPO~BgizX|Y1IXHbhEiXjQ z5re8~RQ4Mtp#2letn5czl68`A+!_s4SMt>c)G diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/AdminRolePage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/AdminRolePage.razor new file mode 100644 index 00000000..181a1ea9 --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/AdminRolePage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/admin" +@attribute [UAuthAuthorize(Roles = "Admin")] + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/AspNetAuthorizePage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/AspNetAuthorizePage.razor new file mode 100644 index 00000000..5b1211d8 --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/AspNetAuthorizePage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/aspnet" +@attribute [Authorize] + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/AuthenticatedPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/AuthenticatedPage.razor new file mode 100644 index 00000000..9d621509 --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/AuthenticatedPage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/authenticated" +@attribute [UAuthAuthorize] + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/CombinedAuthorizationPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/CombinedAuthorizationPage.razor new file mode 100644 index 00000000..d27b0add --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/CombinedAuthorizationPage.razor @@ -0,0 +1,8 @@ +@page "/samples/auth/combined" +@using CodeBeam.UltimateAuth.Core.Defaults +@attribute [UAuthAuthorize(Permissions = UAuthActions.Users.QueryAdmin)] +@attribute [Authorize(Roles = "Admin")] + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/MatchModesPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/MatchModesPage.razor new file mode 100644 index 00000000..8fc527ac --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/MatchModesPage.razor @@ -0,0 +1,4 @@ +@page "/samples/auth/match-modes" +@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/PublicPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/PublicPage.razor new file mode 100644 index 00000000..32cee135 --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/PublicPage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/public" + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/StateViewPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/StateViewPage.razor new file mode 100644 index 00000000..f07ce7a1 --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizationLab/StateViewPage.razor @@ -0,0 +1,4 @@ +@page "/samples/auth/state-view" +@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizedTestPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizedTestPage.razor deleted file mode 100644 index 0a953043..00000000 --- a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/Pages/AuthorizedTestPage.razor +++ /dev/null @@ -1,4 +0,0 @@ -@page "/authorized-test" -@attribute [UAuthAuthorize] - - diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/_Imports.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/_Imports.razor index 22b7f9e4..6d46e295 100644 --- a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/_Imports.razor +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer.EFCore/Components/_Imports.razor @@ -22,6 +22,7 @@ @using CodeBeam.UltimateAuth.Sample.Shared.Components @using CodeBeam.UltimateAuth.Sample.Shared.Components.Page @using CodeBeam.UltimateAuth.Sample.Shared.Components.Layout +@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom @using MudBlazor @using MudExtensions diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AdminPermissionPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AdminPermissionPage.razor new file mode 100644 index 00000000..3fcd123c --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AdminPermissionPage.razor @@ -0,0 +1,6 @@ +@page "/samples/auth/permission-admin" +@using CodeBeam.UltimateAuth.Core.Defaults +@attribute [UAuthAuthorize(Permissions = UAuthActions.Users.QueryAdmin)] + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AdminRolePage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AdminRolePage.razor new file mode 100644 index 00000000..181a1ea9 --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AdminRolePage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/admin" +@attribute [UAuthAuthorize(Roles = "Admin")] + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AspNetAuthorizePage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AspNetAuthorizePage.razor new file mode 100644 index 00000000..5b1211d8 --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AspNetAuthorizePage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/aspnet" +@attribute [Authorize] + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AuthenticatedPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AuthenticatedPage.razor new file mode 100644 index 00000000..9d621509 --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AuthenticatedPage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/authenticated" +@attribute [UAuthAuthorize] + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/CombinedAuthorizationPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/CombinedAuthorizationPage.razor new file mode 100644 index 00000000..d27b0add --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/CombinedAuthorizationPage.razor @@ -0,0 +1,8 @@ +@page "/samples/auth/combined" +@using CodeBeam.UltimateAuth.Core.Defaults +@attribute [UAuthAuthorize(Permissions = UAuthActions.Users.QueryAdmin)] +@attribute [Authorize(Roles = "Admin")] + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/MatchModesPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/MatchModesPage.razor new file mode 100644 index 00000000..8fc527ac --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/MatchModesPage.razor @@ -0,0 +1,4 @@ +@page "/samples/auth/match-modes" +@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/PublicPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/PublicPage.razor new file mode 100644 index 00000000..32cee135 --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/PublicPage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/public" + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/StateViewPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/StateViewPage.razor new file mode 100644 index 00000000..f07ce7a1 --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/StateViewPage.razor @@ -0,0 +1,4 @@ +@page "/samples/auth/state-view" +@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AnonymousTestPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AnonymousTestPage.razor deleted file mode 100644 index 10d035ba..00000000 --- a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AnonymousTestPage.razor +++ /dev/null @@ -1 +0,0 @@ -@page "/anonymous-test" diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/AdminPermissionPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/AdminPermissionPage.razor new file mode 100644 index 00000000..3fcd123c --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/AdminPermissionPage.razor @@ -0,0 +1,6 @@ +@page "/samples/auth/permission-admin" +@using CodeBeam.UltimateAuth.Core.Defaults +@attribute [UAuthAuthorize(Permissions = UAuthActions.Users.QueryAdmin)] + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/AdminRolePage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/AdminRolePage.razor new file mode 100644 index 00000000..181a1ea9 --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/AdminRolePage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/admin" +@attribute [UAuthAuthorize(Roles = "Admin")] + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/AspNetAuthorizePage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/AspNetAuthorizePage.razor new file mode 100644 index 00000000..5b1211d8 --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/AspNetAuthorizePage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/aspnet" +@attribute [Authorize] + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/AuthenticatedPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/AuthenticatedPage.razor new file mode 100644 index 00000000..9d621509 --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/AuthenticatedPage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/authenticated" +@attribute [UAuthAuthorize] + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/CombinedAuthorizationPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/CombinedAuthorizationPage.razor new file mode 100644 index 00000000..d27b0add --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/CombinedAuthorizationPage.razor @@ -0,0 +1,8 @@ +@page "/samples/auth/combined" +@using CodeBeam.UltimateAuth.Core.Defaults +@attribute [UAuthAuthorize(Permissions = UAuthActions.Users.QueryAdmin)] +@attribute [Authorize(Roles = "Admin")] + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/MatchModesPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/MatchModesPage.razor new file mode 100644 index 00000000..8fc527ac --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/MatchModesPage.razor @@ -0,0 +1,4 @@ +@page "/samples/auth/match-modes" +@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/PublicPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/PublicPage.razor new file mode 100644 index 00000000..32cee135 --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/PublicPage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/public" + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/StateViewPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/StateViewPage.razor new file mode 100644 index 00000000..f07ce7a1 --- /dev/null +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizationLab/StateViewPage.razor @@ -0,0 +1,4 @@ +@page "/samples/auth/state-view" +@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom + + diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizedTestPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizedTestPage.razor deleted file mode 100644 index 0a953043..00000000 --- a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/Pages/AuthorizedTestPage.razor +++ /dev/null @@ -1,4 +0,0 @@ -@page "/authorized-test" -@attribute [UAuthAuthorize] - - diff --git a/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AnonymousTestPage.razor b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AnonymousTestPage.razor deleted file mode 100644 index 10d035ba..00000000 --- a/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AnonymousTestPage.razor +++ /dev/null @@ -1 +0,0 @@ -@page "/anonymous-test" diff --git a/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/AdminPermissionPage.razor b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/AdminPermissionPage.razor new file mode 100644 index 00000000..3fcd123c --- /dev/null +++ b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/AdminPermissionPage.razor @@ -0,0 +1,6 @@ +@page "/samples/auth/permission-admin" +@using CodeBeam.UltimateAuth.Core.Defaults +@attribute [UAuthAuthorize(Permissions = UAuthActions.Users.QueryAdmin)] + + diff --git a/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/AdminRolePage.razor b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/AdminRolePage.razor new file mode 100644 index 00000000..181a1ea9 --- /dev/null +++ b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/AdminRolePage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/admin" +@attribute [UAuthAuthorize(Roles = "Admin")] + + diff --git a/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/AspNetAuthorizePage.razor b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/AspNetAuthorizePage.razor new file mode 100644 index 00000000..5b1211d8 --- /dev/null +++ b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/AspNetAuthorizePage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/aspnet" +@attribute [Authorize] + + diff --git a/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/AuthenticatedPage.razor b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/AuthenticatedPage.razor new file mode 100644 index 00000000..9d621509 --- /dev/null +++ b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/AuthenticatedPage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/authenticated" +@attribute [UAuthAuthorize] + + diff --git a/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/CombinedAuthorizationPage.razor b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/CombinedAuthorizationPage.razor new file mode 100644 index 00000000..d27b0add --- /dev/null +++ b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/CombinedAuthorizationPage.razor @@ -0,0 +1,8 @@ +@page "/samples/auth/combined" +@using CodeBeam.UltimateAuth.Core.Defaults +@attribute [UAuthAuthorize(Permissions = UAuthActions.Users.QueryAdmin)] +@attribute [Authorize(Roles = "Admin")] + + diff --git a/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/MatchModesPage.razor b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/MatchModesPage.razor new file mode 100644 index 00000000..8fc527ac --- /dev/null +++ b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/MatchModesPage.razor @@ -0,0 +1,4 @@ +@page "/samples/auth/match-modes" +@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom + + diff --git a/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/PublicPage.razor b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/PublicPage.razor new file mode 100644 index 00000000..32cee135 --- /dev/null +++ b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/PublicPage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/public" + + diff --git a/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/StateViewPage.razor b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/StateViewPage.razor new file mode 100644 index 00000000..f07ce7a1 --- /dev/null +++ b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizationLab/StateViewPage.razor @@ -0,0 +1,4 @@ +@page "/samples/auth/state-view" +@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom + + diff --git a/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizedTestPage.razor b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizedTestPage.razor deleted file mode 100644 index 0a953043..00000000 --- a/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/Pages/AuthorizedTestPage.razor +++ /dev/null @@ -1,4 +0,0 @@ -@page "/authorized-test" -@attribute [UAuthAuthorize] - - diff --git a/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/_Imports.razor b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/_Imports.razor index 3826aa6f..32c621c0 100644 --- a/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/_Imports.razor +++ b/samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/_Imports.razor @@ -21,6 +21,7 @@ @using CodeBeam.UltimateAuth.Sample.Shared.Components @using CodeBeam.UltimateAuth.Sample.Shared.Components.Page @using CodeBeam.UltimateAuth.Sample.Shared.Components.Layout +@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom @using MudBlazor @using MudExtensions diff --git a/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AnonymousTestPage.razor b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AnonymousTestPage.razor deleted file mode 100644 index 10d035ba..00000000 --- a/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AnonymousTestPage.razor +++ /dev/null @@ -1 +0,0 @@ -@page "/anonymous-test" diff --git a/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/AdminPermissionPage.razor b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/AdminPermissionPage.razor new file mode 100644 index 00000000..3fcd123c --- /dev/null +++ b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/AdminPermissionPage.razor @@ -0,0 +1,6 @@ +@page "/samples/auth/permission-admin" +@using CodeBeam.UltimateAuth.Core.Defaults +@attribute [UAuthAuthorize(Permissions = UAuthActions.Users.QueryAdmin)] + + diff --git a/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/AdminRolePage.razor b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/AdminRolePage.razor new file mode 100644 index 00000000..181a1ea9 --- /dev/null +++ b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/AdminRolePage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/admin" +@attribute [UAuthAuthorize(Roles = "Admin")] + + diff --git a/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/AspNetAuthorizePage.razor b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/AspNetAuthorizePage.razor new file mode 100644 index 00000000..5b1211d8 --- /dev/null +++ b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/AspNetAuthorizePage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/aspnet" +@attribute [Authorize] + + diff --git a/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/AuthenticatedPage.razor b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/AuthenticatedPage.razor new file mode 100644 index 00000000..9d621509 --- /dev/null +++ b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/AuthenticatedPage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/authenticated" +@attribute [UAuthAuthorize] + + diff --git a/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/CombinedAuthorizationPage.razor b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/CombinedAuthorizationPage.razor new file mode 100644 index 00000000..d27b0add --- /dev/null +++ b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/CombinedAuthorizationPage.razor @@ -0,0 +1,8 @@ +@page "/samples/auth/combined" +@using CodeBeam.UltimateAuth.Core.Defaults +@attribute [UAuthAuthorize(Permissions = UAuthActions.Users.QueryAdmin)] +@attribute [Authorize(Roles = "Admin")] + + diff --git a/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/MatchModesPage.razor b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/MatchModesPage.razor new file mode 100644 index 00000000..8fc527ac --- /dev/null +++ b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/MatchModesPage.razor @@ -0,0 +1,4 @@ +@page "/samples/auth/match-modes" +@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom + + diff --git a/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/PublicPage.razor b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/PublicPage.razor new file mode 100644 index 00000000..32cee135 --- /dev/null +++ b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/PublicPage.razor @@ -0,0 +1,5 @@ +@page "/samples/auth/public" + + diff --git a/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/StateViewPage.razor b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/StateViewPage.razor new file mode 100644 index 00000000..f07ce7a1 --- /dev/null +++ b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizationLab/StateViewPage.razor @@ -0,0 +1,4 @@ +@page "/samples/auth/state-view" +@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom + + diff --git a/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizedTestPage.razor b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizedTestPage.razor deleted file mode 100644 index 0a953043..00000000 --- a/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/Pages/AuthorizedTestPage.razor +++ /dev/null @@ -1,4 +0,0 @@ -@page "/authorized-test" -@attribute [UAuthAuthorize] - - diff --git a/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/_Imports.razor b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/_Imports.razor index 819b9c9e..f40d9af6 100644 --- a/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/_Imports.razor +++ b/samples/int-wasm/CodeBeam.UAuth.Sample.IntWasm/CodeBeam.UAuth.Sample.IntWasm.Client/_Imports.razor @@ -18,6 +18,7 @@ @using CodeBeam.UltimateAuth.Sample.Shared.Components @using CodeBeam.UltimateAuth.Sample.Shared.Components.Page @using CodeBeam.UltimateAuth.Sample.Shared.Components.Layout +@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom @using MudBlazor @using MudExtensions From 398ea1df5d80418f9d755975fa13a32da1c66a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Can=20Karag=C3=B6z?= Date: Tue, 20 Oct 2026 22:33:25 +0300 Subject: [PATCH 2/2] Fix Blazor Server Sample Razor Page Duplication --- .../Components/SampleRoutes.razor | 1 - .../AuthorizationLab/AdminPermissionPage.razor | 6 ------ .../AuthorizationLab/AdminRolePage.razor | 5 ----- .../AuthorizationLab/AspNetAuthorizePage.razor | 5 ----- .../AuthorizationLab/AuthenticatedPage.razor | 5 ----- .../AuthorizationLab/CombinedAuthorizationPage.razor | 8 -------- .../AuthorizationLab/MatchModesPage.razor | 4 ---- .../AuthorizationLab/PublicPage.razor | 5 ----- .../AuthorizationLab/StateViewPage.razor | 4 ---- .../Components/_Imports.razor | 1 + 10 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AdminPermissionPage.razor delete mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AdminRolePage.razor delete mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AspNetAuthorizePage.razor delete mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AuthenticatedPage.razor delete mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/CombinedAuthorizationPage.razor delete mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/MatchModesPage.razor delete mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/PublicPage.razor delete mode 100644 samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/StateViewPage.razor diff --git a/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/SampleRoutes.razor b/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/SampleRoutes.razor index 78794152..9903d442 100644 --- a/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/SampleRoutes.razor +++ b/samples/CodeBeam.UltimateAuth.Sample.Shared/Components/SampleRoutes.razor @@ -1,5 +1,4 @@ @using System.Reflection -@using CodeBeam.UltimateAuth.Sample.Shared.Components.Page @using CodeBeam.UltimateAuth.Sample.Shared.Infrastructure @implements IDisposable diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AdminPermissionPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AdminPermissionPage.razor deleted file mode 100644 index 3fcd123c..00000000 --- a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AdminPermissionPage.razor +++ /dev/null @@ -1,6 +0,0 @@ -@page "/samples/auth/permission-admin" -@using CodeBeam.UltimateAuth.Core.Defaults -@attribute [UAuthAuthorize(Permissions = UAuthActions.Users.QueryAdmin)] - - diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AdminRolePage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AdminRolePage.razor deleted file mode 100644 index 181a1ea9..00000000 --- a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AdminRolePage.razor +++ /dev/null @@ -1,5 +0,0 @@ -@page "/samples/auth/admin" -@attribute [UAuthAuthorize(Roles = "Admin")] - - diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AspNetAuthorizePage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AspNetAuthorizePage.razor deleted file mode 100644 index 5b1211d8..00000000 --- a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AspNetAuthorizePage.razor +++ /dev/null @@ -1,5 +0,0 @@ -@page "/samples/auth/aspnet" -@attribute [Authorize] - - diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AuthenticatedPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AuthenticatedPage.razor deleted file mode 100644 index 9d621509..00000000 --- a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/AuthenticatedPage.razor +++ /dev/null @@ -1,5 +0,0 @@ -@page "/samples/auth/authenticated" -@attribute [UAuthAuthorize] - - diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/CombinedAuthorizationPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/CombinedAuthorizationPage.razor deleted file mode 100644 index d27b0add..00000000 --- a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/CombinedAuthorizationPage.razor +++ /dev/null @@ -1,8 +0,0 @@ -@page "/samples/auth/combined" -@using CodeBeam.UltimateAuth.Core.Defaults -@attribute [UAuthAuthorize(Permissions = UAuthActions.Users.QueryAdmin)] -@attribute [Authorize(Roles = "Admin")] - - diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/MatchModesPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/MatchModesPage.razor deleted file mode 100644 index 8fc527ac..00000000 --- a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/MatchModesPage.razor +++ /dev/null @@ -1,4 +0,0 @@ -@page "/samples/auth/match-modes" -@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom - - diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/PublicPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/PublicPage.razor deleted file mode 100644 index 32cee135..00000000 --- a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/PublicPage.razor +++ /dev/null @@ -1,5 +0,0 @@ -@page "/samples/auth/public" - - diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/StateViewPage.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/StateViewPage.razor deleted file mode 100644 index f07ce7a1..00000000 --- a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/AuthorizationLab/StateViewPage.razor +++ /dev/null @@ -1,4 +0,0 @@ -@page "/samples/auth/state-view" -@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom - - diff --git a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/_Imports.razor b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/_Imports.razor index 8f58fb15..bb74ad71 100644 --- a/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/_Imports.razor +++ b/samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/Components/_Imports.razor @@ -21,6 +21,7 @@ @using CodeBeam.UltimateAuth.Sample.Shared.Components @using CodeBeam.UltimateAuth.Sample.Shared.Components.Page @using CodeBeam.UltimateAuth.Sample.Shared.Components.Layout +@using CodeBeam.UltimateAuth.Sample.Shared.Components.Custom @using MudBlazor @using MudExtensions