Sql Server 2016 on Docker for Development

No Sql Server installation required! I have searched and found a way for me to run the developer version of Sql Server 2016 on my  SSMS on my development machine and I can spin up my Sql Server instance (or additional instances for that matter) whenever I need.  And when I don’t need it, Sql Server is not still running…

Read more »

Authenticate and Authorize With Jwt Tokens In Asp.Net Core 2 Web Api

Finally! Let’s see how we “login” our user and make requests with Jwt tokens and have other endpoints protected from access without a valid token. Start With The Configuration File To set things up, lets add a few entries into our appsettings.json file.  Let’s add some Token settings to the file.

For our Tokens config, we want to set…

Read more »

Register A New User In Asp.Net Core Web Api

Here is where we get into the meat and potatoes a bit more.  Let’s start adding some endpoints and get our Auth and Auth underway. Start by adding a new, empty Api Controller to your Controllers folder.  I have named mine “AccountController”. Controller and a Register Method Here is my basic Account Controller with a Register method added in:

Read more »

Add Multi-Tenancy to Asp.Net Core Identity

Now I think it starts to get a bit more interesting.  I would like my API to be able to handle Multi-Tenancy.  For this situation we need to add a whole new class/table to Asp.Net Core Identity.  It is not as bad as it sounds. Create the Tenant Let’s start by creating a Tenant object. And let’s look at that…

Read more »

Customize Asp.Net Core’s IdentityUser

In the last post we set up the Asp.Net Identity database and saw that our tables were all created for us.  There is a lot of fields in the AspNetUsers table but if we do a bit of forshadowing….we know that we will need some extra fields. I would like to show the user’s name when they are logged in…

Read more »

Set up Asp.Net Core 2 Web API to use Asp.Net Core Identity

Pure API Project I wanted to do a series on using Asp.Net Core 2 and Asp.Net Identity and expand that and customize it quite a bit…. but… Only using an Web API project.  I could not find anything like that.  Every other post I could find on the subject would mix in an MVC project and things got confusing. If…

Read more »

Import Database into Sql Server Database Project

This article is a continuation of the customized Asp.Net Identity database that was created in previous posts. Create The Project Start by creating a SQL Server Database Project.  To go along with the scenario we set up for creating our database in the first place, I have chosen to name the project ApothecaricIdentityDatatbase. With this project we will be able…

Read more »