Description
Breaking change in AddAuthorization(o =>)
overload lives in a different assembly
We renamed the core AddAuthorization
methods that used to live in Microsoft.AspNetCore.Authorization
to be AddAuthorizationCore
, the old AddAuthorization
methods still exist, but are in the Microsoft.AspNetCore.Authorization.Policy
package instead. Apps that are using both should see no impact, but apps that were not using the policy package will need to switch to using AddAuthorizationCore
Version introduced
3.0
Old behavior
AddAuthorization
methods existed in Microsoft.AspNetCore.Authorization
New behavior
AddAuthorization
methods exist in Microsoft.AspNetCore.Authorization.Policy
, AddAuthorizationCore
is the new name for the old methods
Reason for change
We wanted the better AddAuthorization
name to add all of the common services needed for authorization, so we decided to take over the old name in 3.0..
Recommended action
Either add a reference to Microsoft.AspNetCore.Authorization.Policy
or use AddAuthorizationCore
instead
Category
ASP.NET
Affected APIs
AddAuthorization(Action<AuthorizationOptions>)
Issue metadata
- Issue type: breaking-change
- This announcement has been migrated to: Breaking change in
AddAuthorization(o =>)
overload lives in a different assembly dotnet/docs#14525.