-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Remove AuthorizationFilterAttribute #4233
Comments
What will ChallengeResult end up with if there's no auth middleware? |
An error saying nobody accepted the challenge. |
Authorize requires an auth policy now, so presumably a configuration without providers would have failed earlier right? |
IMHO, this design has always been absolutely evil and semantically "nonsensical". The only place where we know exactly why authorization failed (not authenticated?, lack of permissions?) is in the authorization service. Taking such a decision at the authentication middleware level (by trying to determine whether A while ago, I designed a prototype moving the unauthorized/forbidden decision to the authorization service and introducting an |
Do we need to provide |
RE: aspnet/Security#720 (comment)
This regressed at some point. Authorization failures should result in a challenge. The auth middleware will take over and decide what to do with it.
@blowdart @HaoK
Update
Remove AuthorizationFilterAttribute as we do not want users to easily create their own authorization implementation. They should instead use authorization policies and requirements(IAuthorizationRequirement) to enforce authorization.
The text was updated successfully, but these errors were encountered: