4

I'm looking to add IdentityServer3 to a web app that currently uses a standard Entity Framework, SQL Server, Code First based approach to managing users and roles.

I would like to add IdentityServer3 for securing a new Web API endpoint with Basic Auth, JWT and OAuth2. They key point would be to leave the existing user experience (login urls, cookies etc) undisturbed.

I'd like to leave the ASP.Net identity code alone as much as possible.

My question is, what are the key steps I need to perform and are there are relevant samples?

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

Ryan O'Neill
  • 5,410
  • 4
  • 46
  • 69
  • Not sure which piece of s/w you are referring to, I'm using ASP.Net MVC 5, with EF 6 and the current Identity Provider in a live project. The software is all current and supported. – Ryan O'Neill Jan 25 '16 at 15:53

1 Answers1

5

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

You can find a provided ASP.NET Identity User Service here for inspiration. This includes a sample host in the source.

For getting started with Identity Server this walkthrough in the official documentation would be the best place for you to start .

I also have a couple of articles for getting started with Identity Server and about the default ASP.NET Identity User Service that you may find useful after having a look at the official documentation.

Scott Brady
  • 5,498
  • 24
  • 38
  • 1
    Thanks Scott, I've gone through those and it all seems a lot of work considering that the middleware and servers are supposed to manage the majority of it. I understand, security is complex etc., was just hoping that I wouldn't need to become semi-expert just to add JWT. I'll read more, thanks again. – Ryan O'Neill Jan 26 '16 at 09:56
  • @RyanO'Neill Same experience here. Did you find any more resources since you posted about doing this? – JohnnyHK Apr 25 '17 at 19:09
  • I didn't, it all changes so quickly anyway, IDS 4 is out now and may be simpler. – Ryan O'Neill Apr 26 '17 at 19:59