-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
area-authIncludes: Authn, Authz, OAuth, OIDC, BearerIncludes: Authn, Authz, OAuth, OIDC, Bearerarea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcbreaking-changeThis issue / pr will introduce a breaking change, when resolved / merged.This issue / pr will introduce a breaking change, when resolved / merged.feature-minimal-hosting
Milestone
Description
Following changes to be made to the authentication and authorization configuration APIs and behaviors:
- [ ] Change the WebApplicationBuilder.Authentication property to be a method AddAuthentication() with the same overloads as IServiceCollection.AddAuthentication()
- [ ] Add WebApplicationBuilder.AddAuthorization() method that is functional equivalent of IServiceCollection.AddAuthorizationBuilder()
- Remove
Authenticationproperty from WebApplicationBuilder - Remove binding of
AuthenticationOptions.DefaultSchemefrom configuration (anddotnet user-jwtssetting it in applicationSettings.Development.json) - When there is only a single AuthN scheme added, set
AuthenticationOptions.DefaultPolicyto that scheme, and add a newboolpropertyAuthenticationOptions.DisableAutoDefaultSchemeto enable disabling this behavior - Auto-add AuthN and AuthZ middleware if any AuthN scheme is added in
all hosts (not justWebApplicationBuilder)WebApplicationBuilderand add newbooloptionto the various hosting options/APIsto enable disabling this behavior, e.g.WebApplicationOptions.DisableAutoAddAuthMiddlewareThis behavior should apply whether adding AuthN schemes viaIServiceCollection.AddAuthentication()orWebApplicationBuilder.AddAuthentication(), etc.
Metadata
Metadata
Assignees
Labels
area-authIncludes: Authn, Authz, OAuth, OIDC, BearerIncludes: Authn, Authz, OAuth, OIDC, Bearerarea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcbreaking-changeThis issue / pr will introduce a breaking change, when resolved / merged.This issue / pr will introduce a breaking change, when resolved / merged.feature-minimal-hosting