Skip to content

Commit 898d551

Browse files
authored
[release/7.0-rc1] Register authz middleware for Blazor Server IndAuth (#43375)
* Register authz middleware for Blazor Server IndAuth * Update src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Program.Main.cs * Update src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Program.cs
1 parent f690aac commit 898d551

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Program.Main.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ public static void Main(string[] args)
153153

154154
app.UseRouting();
155155

156+
#if (IndividualAuth)
157+
app.UseAuthorization();
158+
159+
#endif
156160
#if (OrganizationalAuth || IndividualAuth)
157161
app.MapControllers();
158162
#endif

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Program.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@
147147

148148
app.UseRouting();
149149

150+
#if (IndividualAuth)
151+
app.UseAuthorization();
152+
153+
#endif
150154
#if (OrganizationalAuth || IndividualAuth)
151155
app.MapControllers();
152156
#endif

0 commit comments

Comments
 (0)