Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. 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.

Is there any way to implement a token based (OAuth) authentication knowing that the data access will be done trough a SOAP API ?

like image 650
Ricardo Mota Avatar asked Mar 07 '16 13:03

Ricardo Mota


People also ask

What is the difference between authentication and authorization in MVC?

Authentication verifies who the user is. Authorization determines what resources a user can access.


1 Answers

You can take a look IdentityServer3 in combination with the default OpenID middleware. 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. Identity Server supports customization so you can use the datastore of your choice. 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

like image 162
Sander Driesen Avatar answered Sep 23 '22 22:09

Sander Driesen