-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
area-authIncludes: Authn, Authz, OAuth, OIDC, BearerIncludes: Authn, Authz, OAuth, OIDC, Bearerbreaking-changeThis issue / pr will introduce a breaking change, when resolved / merged.This issue / pr will introduce a breaking change, when resolved / merged.enhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing one
Milestone
Description
Is your feature request related to a problem? Please describe.
Prior to endpoint routing, AuthorizationHandlerContext's resource property was of type AuthorizationFilterContext
from which it was possible to RouteData, HttpContext, etc.
Now, with EndpointRouting, AuthorizationHandlerContext.Resource
is of type RouteEndpoint
which describes the endpoint the call is going to, but doesn't include route data.
It's not too hard to work around this with IHttpContextAccessor.HttpContext.GetRouteData()
but, given that it seems like a common scenario for auth handlers to access route data, it would be convenient to not have to inject an extra property into the handler to get that data.
Describe the solution you'd like
Expose RouteData
or HttpContext
directly from AuthorizationHandlerContext
Pastafarian
Metadata
Metadata
Assignees
Labels
area-authIncludes: Authn, Authz, OAuth, OIDC, BearerIncludes: Authn, Authz, OAuth, OIDC, Bearerbreaking-changeThis issue / pr will introduce a breaking change, when resolved / merged.This issue / pr will introduce a breaking change, when resolved / merged.enhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing one