c# - How do you Authorize a Web API Controller in ASP Net Core -
i have created api back-end in c# asp net core. trying figure our way authorize routes take in api key in url such "https://mywebsite.com/api/data/first?key=vx4hcojtmq6zf978a245olw00sfk0ahm" authenticate route , present data in json.
i know in asp net core identity there way authenticate route requires user login first. how can secure api routes api key?
what trying not secure web api. recommend oauth/openid. there open source .net core implementation called identity server 4.
however answer question create custom attribute validate key being passed actions, or handle validation in each action. there no built in way in .net core, have manually handle api key other value being passed web api.
Comments
Post a Comment