Mvc login with Web API [closed]

心不动则不痛 提交于 2019-12-21 13:09:34

问题


In my solution folder there are two projects

  • Myproject.API
  • Myproject.Web

API will server all the request to My Mvc web or android or IOS client.

Now Here I'm confused, Where should I Implement Authentication process.

  • At API or
  • At API and MVC both

As MVC identity uses Cookie based authentication where as API used token based.

Now What I want In Web Project, If any user try to open a page which is only for Authorize user, and if he is not logged in then he should be redirect to Login page, And It is possible when I'll MVC Identity.

If I'll Implement At API then How I'll manage cookies at Web Project.

and How I'll Send that token in every request from WEB to API

来源:https://stackoverflow.com/questions/37133060/mvc-login-with-web-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!