From 3d87d2c62efe82e374a564cedf0c2bc49b1e5652 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Fri, 17 Jul 2026 06:08:28 -0400 Subject: [PATCH 1/6] Revise IAuthorizationRequirementData article details Updated the article to clarify that the IAuthorizationRequirementData interface is supported only in Minimal APIs. Adjusted the sample app description to specify the endpoint and the age requirement. --- ...orization-policies-with-iauthorizationrequirementdata.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md b/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md index b04e2b3fce54..7f123bd4b5c1 100644 --- a/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md +++ b/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md @@ -5,18 +5,18 @@ author: tdykstra description: Learn how to specify requirements associated with the authorization policy in attribute definitions with the IAuthorizationRequirementData interface. monikerRange: '>= aspnetcore-8.0' ms.author: tdykstra -ms.date: 03/11/2026 +ms.date: 07/17/2026 uid: security/authorization/iard --- # Custom authorization policies with `IAuthorizationRequirementData` Use the interface to specify requirements associated with the authorization policy in attribute definitions. -This article uses a [Minimal API](xref:fundamentals/minimal-apis) endpoint within the app and focuses on testing JWT-based authorization. For a demonstration of similar guidance in an MVC app with a controller, see the . +This article uses a [Minimal API](xref:fundamentals/minimal-apis) endpoint within a Blazor Web App and focuses on testing JWT-based authorization. is only supported in Minimal APIs. For a demonstration in an MVC app with a controller, see the . ## Sample app -The Blazor Web App sample for this article is the [`AuthRequirementsDataBWA` sample app (`dotnet/AspNetCore.Docs.Samples` GitHub repository)](https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/security/authorization/AuthRequirementsDataBWA) ([how to download](xref:index#how-to-download-a-sample)). The sample app implements a minimum age handler for users, requiring a user to present a birth date claim indicating that they're at least 21 years old. +The Blazor Web App sample for this article is the [`AuthRequirementsDataBWA` sample app (`dotnet/AspNetCore.Docs.Samples` GitHub repository)](https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/security/authorization/AuthRequirementsDataBWA) ([how to download](xref:index#how-to-download-a-sample)). The sample app implements a minimum age handler for users accessing a Minimal API endpoint at `/api/greetings/hello`, requiring a user to present a birth date claim indicating that they're at least 21 years old. ## Minimum age authorize attribute From db86a31af3bcbf018a13ea065d5bbfaff555d008 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Fri, 17 Jul 2026 09:10:04 -0400 Subject: [PATCH 2/6] Update IAuthorizationRequirementData support information Clarified that IAuthorizationRequirementData isn't supported in Razor components. --- ...authorization-policies-with-iauthorizationrequirementdata.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md b/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md index 7f123bd4b5c1..fe55b584e8b4 100644 --- a/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md +++ b/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md @@ -12,7 +12,7 @@ uid: security/authorization/iard Use the interface to specify requirements associated with the authorization policy in attribute definitions. -This article uses a [Minimal API](xref:fundamentals/minimal-apis) endpoint within a Blazor Web App and focuses on testing JWT-based authorization. is only supported in Minimal APIs. For a demonstration in an MVC app with a controller, see the . +This article uses a [Minimal API](xref:fundamentals/minimal-apis) endpoint within a Blazor Web App and focuses on testing JWT-based authorization. isn't supported in Razor components. For a demonstration in an MVC app with a controller, see the . ## Sample app From ed060fbb4dd9672655725d933991d978f8197af3 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Fri, 17 Jul 2026 10:10:32 -0400 Subject: [PATCH 3/6] Update article on IAuthorizationRequirementData support Clarified that IAuthorizationRequirementData is not supported for certain authorization attributes, including Razor components and SignalR hub classes. --- ...tion-policies-with-iauthorizationrequirementdata.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md b/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md index fe55b584e8b4..57f6f25aac6a 100644 --- a/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md +++ b/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md @@ -12,7 +12,15 @@ uid: security/authorization/iard Use the interface to specify requirements associated with the authorization policy in attribute definitions. -This article uses a [Minimal API](xref:fundamentals/minimal-apis) endpoint within a Blazor Web App and focuses on testing JWT-based authorization. isn't supported in Razor components. For a demonstration in an MVC app with a controller, see the . +This article uses a [Minimal API](xref:fundamentals/minimal-apis) endpoint within a Blazor Web App and focuses on testing JWT-based authorization. + + isn't supported for authorization attributes applied to: + +* Razor components +* SignalR hub classes and methods +* in MVC and Razor Pages + +For a demonstration in an MVC app with a controller and an , see the . ## Sample app From 9cee6de9cef921534f67049716b309d7e703cfb7 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Fri, 17 Jul 2026 10:11:25 -0400 Subject: [PATCH 4/6] Fix typo in authorization policies documentation --- ...authorization-policies-with-iauthorizationrequirementdata.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md b/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md index 57f6f25aac6a..d67c6b56d1cc 100644 --- a/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md +++ b/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md @@ -18,7 +18,7 @@ This article uses a [Minimal API](xref:fundamentals/minimal-apis) endpoint withi * Razor components * SignalR hub classes and methods -* in MVC and Razor Pages +* s in MVC and Razor Pages For a demonstration in an MVC app with a controller and an , see the . From 443cb253ddb7d27db13669a02973992f375dec27 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Wed, 29 Jul 2026 11:27:37 -0400 Subject: [PATCH 5/6] Update article on custom authorization policies Clarified the context of the article and removed unsupported authorization attributes list. --- ...tion-policies-with-iauthorizationrequirementdata.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md b/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md index d67c6b56d1cc..1c3d7f186b75 100644 --- a/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md +++ b/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md @@ -12,15 +12,7 @@ uid: security/authorization/iard Use the interface to specify requirements associated with the authorization policy in attribute definitions. -This article uses a [Minimal API](xref:fundamentals/minimal-apis) endpoint within a Blazor Web App and focuses on testing JWT-based authorization. - - isn't supported for authorization attributes applied to: - -* Razor components -* SignalR hub classes and methods -* s in MVC and Razor Pages - -For a demonstration in an MVC app with a controller and an , see the . +This article uses a [Minimal API](xref:fundamentals/minimal-apis) endpoint within the app and focuses on testing JWT-based authorization. For a demonstration of similar guidance in an MVC app with a controller, see the . ## Sample app From a00d990dc3e4eeb00867a14da86f39a79a983298 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Wed, 29 Jul 2026 11:27:53 -0400 Subject: [PATCH 6/6] Change publication date for authorization policies document Update the date for the document on custom authorization policies. --- ...authorization-policies-with-iauthorizationrequirementdata.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md b/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md index 1c3d7f186b75..ec98e5bab0b7 100644 --- a/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md +++ b/aspnetcore/security/authorization/custom-authorization-policies-with-iauthorizationrequirementdata.md @@ -5,7 +5,7 @@ author: tdykstra description: Learn how to specify requirements associated with the authorization policy in attribute definitions with the IAuthorizationRequirementData interface. monikerRange: '>= aspnetcore-8.0' ms.author: tdykstra -ms.date: 07/17/2026 +ms.date: 07/29/2026 uid: security/authorization/iard --- # Custom authorization policies with `IAuthorizationRequirementData`