简体   繁体   中英

WebApi and Controller Authentication

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.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM