-
Notifications
You must be signed in to change notification settings - Fork 25k
Add application scope handler approach #36579
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 adds documentation for a new application scope handler approach for accessing AuthenticationStateProvider in outgoing request middleware for Blazor applications. The PR addresses issue #36562 by providing developers with a recommended alternative to the existing circuit activity handler approach when working with HTTP clients created by IHttpClientFactory.
Key changes:
- Adds a comprehensive new section documenting the application scope handler pattern as the recommended approach for accessing authentication state in delegating handlers
- Retains the existing circuit activity handler approach as an alternative method
- Improves cross-linking to HTTP request middleware documentation across multiple files
- Fixes minor style issues (capitalization and punctuation)
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| aspnetcore/blazor/security/additional-scenarios.md | Adds the main application scope handler documentation with code examples, restructures the section to present both approaches, and adds cross-reference notes about DelegatingHandler |
| aspnetcore/blazor/fundamentals/dependency-injection.md | Updates cross-reference text to clarify that it points to the circuit activity handler approach specifically |
| aspnetcore/blazor/call-web-api.md | Adds a new section explaining how to access services outside of HttpClient's scope with cross-references to the new documentation |
| aspnetcore/blazor/security/blazor-web-app-with-oidc.md | Adds cross-reference link to DelegatingHandler documentation |
| aspnetcore/blazor/security/webassembly/additional-scenarios.md | Adds cross-reference link to DelegatingHandler documentation and improves formatting |
| aspnetcore/blazor/security/webassembly/graph-api.md | Adds cross-reference link to DelegatingHandler documentation |
| aspnetcore/fundamentals/dependency-injection.md | Fixes capitalization of "middleware" and "keyed services" in section header, adds missing period |
Co-authored-by: Copilot <[email protected]>
|
@dotnet/aspnet-blazor-eng ... I think Javier is buried in work at the moment. I'm trying to get PRs pushed through because I have so many open PRs right now. Is anyone free to provide a tech review on this? My OP and the Copilot description ☝️ is a good summary of what this PR is seeking to accomplish. |
Fixes #36562
Javier, this ...
userif they want to check the user's auth state on every request.Internal previews