Skip to content

Updated the documentation to use aspnetcore sample code. #35186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

samabos
Copy link

@samabos samabos commented Apr 9, 2025

Fixes #35045

Removed ASPNETCORE.Docs sample and replace with test code sample in /dotnet/aspnetcore repository.


Internal previews

📄 File 🔗 Preview link
aspnetcore/security/authorization/iard.md Custom authorization policies with IAuthorizationRequirementData

@samabos
Copy link
Author

samabos commented Apr 9, 2025

@dotnet-policy-service agree

@samabos samabos marked this pull request as draft April 9, 2025 15:45
@samabos samabos marked this pull request as ready for review April 9, 2025 15:46
@samabos samabos marked this pull request as draft April 9, 2025 15:47
@Rick-Anderson
Copy link
Contributor

@wadepickett can you add support for linking to https://github.com/dotnet/aspnetcore to our repo like we did with https://github.com/dotnet/AspNetCore.Docs.Samples ?

@wadepickett wadepickett requested review from Rick-Anderson and removed request for wadepickett April 10, 2025 17:47
@wadepickett
Copy link
Contributor

@Rick-Anderson, I changed the review request to you for your topic. I can't do this one.

@wadepickett
Copy link
Contributor

@wadepickett can you add support for linking to https://github.com/dotnet/aspnetcore to our repo like we did with https://github.com/dotnet/AspNetCore.Docs.Samples ?

@Rick-Anderson, I moved this discussion to an email thread to figure out details. Thanks.

@@ -11,15 +11,15 @@ uid: security/authorization/iard

Consider the following sample that implements a custom `MinimumAgeAuthorizationHandler`:

:::code language="csharp" source="~/../AspNetCore.Docs.Samples/security/authorization/AuthRequirementsData/Program.cs" highlight="9":::
:::code language="csharp" source="~/../aspnetcore/src/Security/samples/CustomPolicyProvider/Startup.cs" highlight="23":::
Copy link
Contributor

@wadepickett wadepickett Apr 10, 2025

Choose a reason for hiding this comment

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

Since I'm not up yet on the intent here you may need to disregard, but I see this is moving back to before .NET 6 using Startup.cs rather than Program.cs. Maybe that is intentional, but I'll call it out just in case. @Rick-Anderson who owns the security topics can determine what is right for it, so let him weigh in first.

Copy link
Author

Choose a reason for hiding this comment

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

Hi @wadepickett, I noticed that as well. Is there an updated code sample we can refer to? If not, it might be best to submit a PR to update the aspnetcore repo sample with the .NET 9/10 pattern first, before this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @wadepickett, I noticed that as well. Is there an updated code sample we can refer to? If not, it might be best to submit a PR to update the aspnetcore repo sample with the .NET 9/10 pattern first, before this PR.

Yes, a PR would be welcome. Before doing the PR, propose the work you intend to do in dotnet/aspnetcore#61437 and get approval.

@Rick-Anderson Rick-Anderson removed their request for review April 10, 2025 21:40
@Rick-Anderson
Copy link
Contributor

Let's table this issue until dotnet/aspnetcore#61437 closes.

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.

remove docs sample and replace with test code sample in /dotnet/aspnetcore
3 participants