How do I add IdentityServer3 to an existing ASP.Net Identity project?

I want to add IdentityServer3 to a web application that currently uses the standard Entity Framework, SQL Server, Code First approach to manage users and roles.

I would like to add IdentityServer3 to protect the new web API endpoint using Basic Auth, JWT, and OAuth2. The key point would be to leave the existing user interface intact (login URLs, cookies, etc.).

I would like to leave the ASP.Net ID code as much as possible.

My question is: what are the main steps that I need to follow, and are there any relevant examples?

There seems to be a lot of documentation, but it's pretty involved, and I can't find a sample for this exact scenario.

+4
source share
1 answer

In addition to the usual setup of Identity Server, if you have an existing ASP.NET identifier code base that you would like to use, you will need to implement the Identity Server UserService functions. This service allows Identity Server to use your user store to authenticate users.

You can find the provided ASP.NET Identity User Service here for inspiration. This includes an example of a node in the source.

Identity Server .

Identity Server ASP.NET Identity User Service, .

+4

Source: https://habr.com/ru/post/1625858/


All Articles