Skip to content

Roll Blazor into the Simple Auth article#36650

Merged
guardrex merged 8 commits intomainfrom
guardrex/simple-auth-updates
Mar 5, 2026
Merged

Roll Blazor into the Simple Auth article#36650
guardrex merged 8 commits intomainfrom
guardrex/simple-auth-updates

Conversation

@guardrex
Copy link
Collaborator

@guardrex guardrex commented Jan 20, 2026

Fixes #35816

  • General guidance and example improvements.
  • Add ✨ Blazor goodness ✨.
  • Drop the RP sample app ... not necessary ... bloating the repo ... not maintained.
  • Establish MVC and RP security nodes (per DR guidance, see below).

cc: @tdykstra (article metadata author) and @wadepickett for discussion

Dan stated (and confirmed offline) ...

For consistency, this content should be consolidated into authn-and-authz docs that live under the corresponding areas for those technologies. In cases where we use these technologies to demonstrate general authorization concepts, we should instead use Minimal APIs & Blazor to demonstrate those concepts.


Internal previews

📄 File 🔗 Preview link
aspnetcore/mvc/security/authorization/simple.md aspnetcore/mvc/security/authorization/simple
aspnetcore/razor-pages/index.md aspnetcore/razor-pages/index
aspnetcore/razor-pages/security/authorization/simple.md aspnetcore/razor-pages/security/authorization/simple
aspnetcore/security/authentication/identity-configuration.md aspnetcore/security/authentication/identity-configuration
aspnetcore/security/authentication/identity.md aspnetcore/security/authentication/identity
aspnetcore/security/authentication/index.md aspnetcore/security/authentication/index
aspnetcore/security/authorization/policies.md aspnetcore/security/authorization/policies
aspnetcore/security/authorization/secure-data.md aspnetcore/security/authorization/secure-data
aspnetcore/security/authorization/simple.md aspnetcore/security/authorization/simple
aspnetcore/toc.yml aspnetcore/toc

@guardrex guardrex requested a review from danroth27 January 21, 2026 14:17
@guardrex guardrex marked this pull request as ready for review January 21, 2026 14:38
@guardrex guardrex removed the request for review from danroth27 March 4, 2026 20:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the "Simple authorization" article (aspnetcore/security/authorization/simple.md) to center on Blazor Razor component examples, per the guidance from issue #35816 to consolidate authorization content under corresponding technology areas. Two new companion articles are created for MVC and Razor Pages, the old .NET Core 3.1 Razor Pages sample app is deleted, and cross-reference links throughout the repo are updated.

Changes:

  • Rewrites the main simple.md article to focus on Blazor, with new MVC (mvc/security/authorization/simple.md) and Razor Pages (razor-pages/security/authorization/simple.md) articles for technology-specific guidance.
  • Adds "Security and Identity > Authorization" TOC nodes under both the Razor Pages and MVC sections.
  • Replaces all [!INCLUDE[](~/includes/requireAuth.md)] usages with inline <xref:> links and deletes the now-unused include file and the 3.1 sample app.

Reviewed changes

Copilot reviewed 38 out of 47 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
aspnetcore/security/authorization/simple.md Rewritten to use Blazor examples; links to new MVC/RP articles
aspnetcore/mvc/security/authorization/simple.md New MVC-specific simple authorization article
aspnetcore/razor-pages/security/authorization/simple.md New Razor Pages-specific article with handler authorization guidance
aspnetcore/toc.yml Adds Security and Identity > Authorization nodes under Razor Pages and MVC
aspnetcore/security/authorization/secure-data.md Updates #rau anchor links to #require-authenticated-users
aspnetcore/security/authorization/policies.md Replaces requireAuth.md include with inline xref
aspnetcore/security/authorization/policies/includes/policies5.md Replaces requireAuth.md include with inline xref
aspnetcore/security/authentication/index.md Updates #rau anchor links to #require-authenticated-users
aspnetcore/security/authentication/identity.md Replaces requireAuth.md include with inline xref
aspnetcore/security/authentication/identity/includes/identity6.md Replaces requireAuth.md include with inline xref
aspnetcore/security/authentication/identity-configuration.md Replaces requireAuth.md include with inline xref
aspnetcore/razor-pages/index.md Updates link text/anchor for Razor Pages auth section
aspnetcore/razor-pages/index/includes/index35.md Updates link text/anchor for Razor Pages auth section
aspnetcore/includes/requireAuth.md Deleted (no longer used)
aspnetcore/security/authorization/simple/samples/3.1/PageHandlerAuth/* Deleted old sample app (many files)

Copy link
Contributor

Copilot AI commented Mar 5, 2026

@guardrex I've opened a new pull request, #36839, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

@tdykstra tdykstra left a comment

Choose a reason for hiding this comment

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

A few suggestions, nothing major

guardrex and others added 2 commits March 5, 2026 14:02
Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>
…-circuited on auth failure (#36839)

* Initial plan

* Fix AuthorizeIndexPageHandlerFilter to short-circuit pipeline on failed authorization

Co-authored-by: guardrex <1622880+guardrex@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: guardrex <1622880+guardrex@users.noreply.github.com>
@guardrex guardrex merged commit e35c3ed into main Mar 5, 2026
4 checks passed
@guardrex guardrex deleted the guardrex/simple-auth-updates branch March 5, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simple auth: Refactor for Blazor

4 participants