Closed
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