简体   繁体   English

使用现有数据库进行ASP.NET Core MVC身份验证

[英]ASP.NET Core MVC Authentication with existing database

I'm about to implement a web application (back office for an existing app.) using the ASP.NET Core framework. 我将使用ASP.NET Core框架实现一个Web应用程序(现有应用程序的后台)。 At the moment I'm thinking about on how will I authenticate the user. 目前,我正在考虑如何验证用户身份。 The main database is using MySQL (not supported on this framework), so I will access the database troughout an existing PHP SOAP API. 主数据库使用MySQL(此框架不支持),因此我将通过现有的PHP SOAP API访问该数据库。

Is there any way to implement a token based (OAuth) authentication knowing that the data access will be done trough a SOAP API ? 知道数据访问将通过SOAP API进行,是否有任何方法可以实现基于令牌(OAuth)的身份验证?

You can take a look IdentityServer3 in combination with the default OpenID middleware. 您可以将IdentityServer3与默认的OpenID中间件结合使用。 You can completely separate the authentication logic from your application. 您可以将身份验证逻辑与应用程序完全分开。 Your application will trust the tokens generated by the identity server. 您的应用程序将信任身份服务器生成的令牌。 The same as signin in with facebook/google/linkedin accounts etc.. using your own secure ticket provider. 与使用您自己的安全票务提供商登录facebook / google / linkedin帐户等相同。 Identity Server supports customization so you can use the datastore of your choice. Identity Server支持自定义,因此您可以使用所选的数据存储。 It is also possible to use your identity server for a various set of applications as long as they are "known" by your identity server. 您的身份服务器也可以用于各种应用程序,只要它们被身份服务器“知道”即可。 Definitely worth the investigation if you ask me. 如果您问我,绝对值得调查。

https://github.com/IdentityServer/IdentityServer3 https://github.com/IdentityServer/IdentityServer3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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