I've currently got an MVC4 site running with custom user authentication (we eventually set FormsAuthentication.SetAuthCookie) and everything works fine.
I want to move from the current setup and use a new Web API to serve the data in a REST format
my question is - using a Web API what is the best way to check if a user is logged in? say we want to just expose the Web API to another device, how could I control a user being authorized to use the API?
any help would be great!
cheers ste.
Have a look at this sample, should be exactly what you need:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.