I'm making a web application by using Web API 2 and MVC 5.
My app has api : api/account/login, which is used for checking posted information and throw status 200 when an account is granted to access application.
Also, I have one view : /Home/Index which is only available to authenticated client.
Now, my approach is :
- Call api/account/login, receive the cookie thrown from that api.
- Attach thrown back cookie to browser.
- When user access /Home/Index, view is available for him/her.
My questions are :
- Is my approach possible ?
- How can I encrypt my cookie in Web API 2 like MVC 5 does to its cookie ?
Thank you,
See Question&Answers more detail:os