Skip to content

WebApplication.CreateSlimBuilder() should auto-register AuthN/Z middleware when associated services are added #47507

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
DamianEdwards opened this issue Mar 30, 2023 · 0 comments · Fixed by #47664
Assignees
Labels
area-auth Includes: Authn, Authz, OAuth, OIDC, Bearer
Milestone

Comments

@DamianEdwards
Copy link
Member

The WebApplication.CreateSlimBuilder(args) method should automatically register the authentication and authorization middleware if the associated authn/z services are added to the app's container, in the same way that WebApplication.CreateBuilder(args) does.

@ghost ghost added the area-auth Includes: Authn, Authz, OAuth, OIDC, Bearer label Mar 30, 2023
@eerhardt eerhardt self-assigned this Mar 30, 2023
@eerhardt eerhardt added this to the 8.0-preview4 milestone Mar 30, 2023
eerhardt added a commit to eerhardt/aspnetcore that referenced this issue Apr 12, 2023
WebApplication.CreateSlimBuilder() should auto-register AuthN/Z middleware when associated services are added This is consistent with CreateBuilder, and doesn't add much size to the app when AuthN/Z are not used.

Fix dotnet#47507
eerhardt added a commit that referenced this issue Apr 13, 2023
WebApplication.CreateSlimBuilder() should auto-register AuthN/Z middleware when associated services are added This is consistent with CreateBuilder, and doesn't add much size to the app when AuthN/Z are not used.

Fix #47507
@ghost ghost locked as resolved and limited conversation to collaborators May 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-auth Includes: Authn, Authz, OAuth, OIDC, Bearer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@DamianEdwards @eerhardt and others