Skip to content
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

Provide an example using AuthorizationPolicyBuilder #34469

Open
tdykstra opened this issue Jan 11, 2025 · 1 comment
Open

Provide an example using AuthorizationPolicyBuilder #34469

tdykstra opened this issue Jan 11, 2025 · 1 comment

Comments

@tdykstra
Copy link
Contributor

tdykstra commented Jan 11, 2025

Description

UUF verbatim

It would be really useful to see an example of the below. Git repo doesn't have it either."The AuthorizationPolicyBuilder should either be constructed with at least one authorization scheme name or always succeed. Otherwise there is no information on how to provide a challenge to the user and an exception will be thrown.Adding requirements to the policy based on the age with AuthorizationPolicyBuilder.AddRequirements. In other scenarios, you might use RequireClaim, RequireRole, or RequireUserName instead."

Page URL

https://learn.microsoft.com/en-us/aspnet/core/security/authorization/iauthorizationpolicyprovider?view=aspnetcore-9.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/security/authorization/iauthorizationpolicyprovider.md

Document ID

7b5c3832-a5a3-a27a-eed3-3ecfc3e8dbe2

Article author

@mjrousos

Metadata

  • ID: 150023ea-e35a-4a06-6f71-7ab63994b07f
  • Service: aspnet-core
  • Sub-service: security

Related Issues

@tdykstra tdykstra added doc-enhancement Source - Docs.ms Docs Customer feedback via GitHub Issue labels Jan 11, 2025
@Rick-Anderson Rick-Anderson changed the title Provide an example Provide an example using AuthorizationPolicyBuilder Jan 11, 2025
@Rick-Anderson
Copy link
Contributor

@tdykstra @wadepickett we should try to have meaningful titles when we triage issues

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants