ASP.NET Core Web API模板中没有“个人用户帐户"身份验证选项 [英] No Individual User Accounts auth option in ASP.NET Core Web API template

查看:230
本文介绍了ASP.NET Core Web API模板中没有“个人用户帐户"身份验证选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于为什么最新的ASP.NET Core Web API模板中没有个人用户帐户"身份验证选项,我有些困惑.

I am a bit confused as to why there is no Individual User Accounts authentication option in the latest ASP.NET Core Web API template.

是否仍然可以像MVC模板那样实现个人用户帐户?

Is it still possible to implement individual user accounts the way that the MVC template does or would it not make sense?

假设我正在创建一个独立的Web API,它将具有我所有的业务逻辑和数据层,该层将访问具有AspNet Identity表的数据库.我打算使用MVC应用程序对该API进行调用.

Let's say I am creating a stand-alone web API that is going to have all of my business logic and data layer that accesses the database which has the AspNet Identity tables. I plan on making calls to this API w/ an MVC app.

我知道执行此操作的一种方法是使用单个用户帐户auth创建一个asp.net MVC应用,并使用controllers/api文件夹在MVC应用内直接构建API.但是,我不想这样做,因为我希望API成为其自己的独立项目,该项目可以托管在完全不同的服务器上,并且可以由多个应用程序访问,而不仅仅是MVC应用程序.

I know one way of doing this is to create an asp.net MVC app w/ individual user accounts auth and simply build the API right within the MVC app using a controllers/api folder. However, I don't want to do it this way because I want the API to be its own standalone project that can be hosted on a completely different server and accessed by multiple applications, not just an MVC app.

由于没有模板,有人可以引导我正确地进行身份验证在这种情况下的工作原理吗?

Can someone lead me in the right direction on how authentication typically works in this scenario since there is no template?

推荐答案

不幸的是,.net Core 2.0 Preview 1在VS 2017版本中不可用.

Unfortunately .NET Core 2.0 Preview 1 isn't available in VS 2017 release.

但是您可以安装

这篇关于ASP.NET Core Web API模板中没有“个人用户帐户"身份验证选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆