How can I add the ControllerActionDescriptor into RouteEndpoint.Metadata

Faiven Chan 1 Reputation point
2021-09-29T03:47:24.187+00:00
  1. I am building a role-based access control asp.net core web api system.
  2. my permissions base on controller and action
  3. I need to know which controller and action the incoming request is routed to in my CustomAuthorizationHandler
  4. How can I add the ControllerActionDescriptor into RouteEndpoint.Metadata? It's not in the Metadata by default

136090-20210929114359.png

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,372 questions
{count} votes