Looking for suggestions of how to go about this:
I have an asp.net core 2 webapi project secured with JWT authentication and user role authorization.
I added a 3rd party middleware in my asp.net webapi that exposes metrics endpoints.
I can set the endpoint route and port in the metrics middleware but there is no option for authorization.
I would like to secure those endpoints the same as my own API endpoints so only a certain role can access them, but not sure how to go about this, perhaps some other custom middleware lower down the chain that spots those routes and checks for the JWT?