I have created a web API (ASP.Net core 6) and there is one endpoint to view resources(opens in new tab). Since it (resource) opens in new tab I can not implement authorization functionality on that endpoint. So I want to implement a custom authorization attribute that accepts the users token which can be passed as URL parameter (http://{website}/{action}?token={token}) and validate the token.
I have followed similar questions and posts. Few of them are post 1 and post 2.
Still No success. Could someone please show how I can achieve this. Since I am a beginner with .Net I expects your support. Thank you!