Skip to content

Overhaul custom authz policy provider article - #37379

Open
guardrex wants to merge 13 commits into
mainfrom
guardrex/iauthorizationpolicyprovider-updates
Open

Overhaul custom authz policy provider article#37379
guardrex wants to merge 13 commits into
mainfrom
guardrex/iauthorizationpolicyprovider-updates

Conversation

@guardrex

@guardrex guardrex commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Fixes #37370
Fixes #19611
Fixes #34469
Addresses #35801

Notes

  • Overhauls the policy providers article with a shift to Blazor/Minimal APIs.
  • Fixes two long-standing issues on the repo for this article.
  • Recommend that we rename this file to get a little more SEO juice, so I'm drafting it with custom-authorization-policy-providers.md, and I like to match the UID for such changes.
  • I re-organize and expand the explanations of the API and examples of the original coverage (live article). The goals are to ...
    • Provide more guidance on IAuthorizationPolicyProvider in a single reference section and not have it sprinkled down into other sections of the article later, which is more like what I would expect a tutorial to do. I also think that we need to bring more of the (hidden) framework code remarks into the article.
    • Explain out the general process of developing a custom authz attribute and custom provider in a bit more detail.
  • The sample code in the BlazorWebAppAuthorization sample app is shown inline for easy reviewing of this PR. I'll pull that sample code out of the article before merging this PR.

🦖 NOTE TO SELF 🦖 - Remove the inline code before merging this PR!

API cross-links ...

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request overhauls the existing authorization policy provider documentation by renaming/replacing the old iauthorizationpolicyprovider.md article with a new, expanded article focused on Blazor Web Apps and Minimal APIs, and updates navigation and redirections accordingly.

Changes:

  • Replaces the old security/authorization/iauthorizationpolicyprovider article with security/authorization/custom-authorization-policy-providers and updates TOC + cross-references.
  • Adds a redirection from the deleted article path to the new article path.
  • Updates the shared git-download include content used by the new article.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
aspnetcore/toc.yml Updates TOC entry to point to the new article UID.
aspnetcore/security/authorization/policies.md Updates the cross-reference to the renamed policy provider article.
aspnetcore/security/authorization/iauthorizationpolicyprovider.md Deletes the old article in favor of the new replacement article.
aspnetcore/security/authorization/custom-authorization-policy-providers.md Adds the new, expanded replacement article content.
aspnetcore/includes/git-download.md Updates the sparse-checkout tip content used by the new article.
.openpublishing.redirection.json Adds a redirect from the deleted article path to the new article path.
Comments suppressed due to low confidence (1)

aspnetcore/security/authorization/custom-authorization-policy-providers.md:152

  • The :::code directive already inserts the referenced sample file, but the article also includes a second, inline copy of the same code plus a "DOC REVIEWER NOTE" that says it will be removed. This will duplicate content in the rendered article and should be cleaned up before merge (keep either :::code or the inline copy, but not both).
:::code language="csharp" source="~/../AspNetCore.Docs.Samples/security/authorization/BlazorWebAppAuthorization/Policies/Attributes/MinimumAgeAuthorizeAttribute.cs":::

<!-- DOC REVIEWER NOTE: The preceding cross-link inserts the following code.
                        The following code will be removed prior to merging
                        the PR.

Comment thread aspnetcore/includes/git-download.md Outdated
Comment thread aspnetcore/security/authorization/custom-authorization-policy-providers.md Outdated
Comment thread aspnetcore/security/authorization/custom-authorization-policy-providers.md Outdated
Comment thread .openpublishing.redirection.json
@guardrex
guardrex requested a review from halter73 July 30, 2026 14:51
@guardrex
guardrex marked this pull request as ready for review July 30, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants