filmov
tv
ASP.NET Identity with Identity Server 4 | Tutorial Part 1
Показать описание
In this tutorial I will show you how to Configure ASP.NET Identity with Identity Server 4. The aim of this tutorial series is to ease up the Authentication process and provide a clear step-by-step process on how to secure your web applications. The entire tutorial will be done in .NET 6 and Blazor.
👍If you enjoyed this tutorial, please like this video consider subscribing for more content like this!
By the end of this tutorial, you will:
- Be able to integrate ASP.NET Identity with IdentityServer4
- Understand the components of a fully-secured .NET 6 application
- Understand the installation process for an IdentityServer4 project
- Be able to install the dependencies necessary for IdentityServer4
Steps:
Part 1: Setup the API
1. Create a new ASP.NET Core Empty project
2. Setup a ClassLibrary project for the Database
- Install-Package Microsoft.EntityFrameworkCore.SqlServer -Version 6.0.1
- Install-Package Microsoft.EntityFrameworkCore.Tools -Version 6.0.1
3. Add and Migrate an entity with EntityFramework Core
4. Add a CoffeeShop Service and Model
5. Create and Register API Controller (CoffeeShop)
6. Add CoffeeShops to the Database
Part 2 - Setting up the Identity Server (Server) project
8. Add an empty ASP.NET Web Project to the Solution
9. Install IdentityServer4 Dependencies (written bellow so you can just copy-paste them in your package manager console in the Server project)
Install-Package IdentityServer4 -Version 4.1.2
Install-Package IdentityServer4.EntityFramework -Version 4.1.2
Install-Package Microsoft.EntityFrameworkCore.Tools -Version 6.0.1
Install-Package Microsoft.EntityFrameworkCore.SqlServer -Version 6.0.1
Install-Package Microsoft.AspNetCore.Identity.UI -Version 6.0.1
Install-Package IdentityServer4.AspNetIdentity -Version 4.1.2
Install-Package Microsoft.AspNetCore.Identity.EntityFrameworkCore -Version 6.0.1
12. Create IdentityServer migrations (Default project: Server)
13. Update the IdentityServer Databases
14. Add ASP.NET Identity to the Server project
15. Add ASP.NET Identity migrations (Server proj) and run them
Add-Migration InitialAspNetIdentityMigration -Context AspNetIdentityDbContext
Update-Database -Context AspNetIdentityDbContext
16. Add IdentityServer4 Configuration and SeedData
17. Setup the IdentityServer Seeding process
- dotnet run Server/bin/Debug/net6.0/Server /seed --project Server
18. Setup the IdentityServer authentication flow
19. Update IdentityServer QuickStart code
Useful Links:
0:00 – Intro
0:50 – Components of this tutorial
4:03 - Create a new ASP.NET Core Empty project
6:09 - Setup a ClassLibrary project for the Database
13:32 – Add and Migrate an entity with EntityFramework Core
20:00 - Add a CoffeeShop Service and Model
24:11 - Create and Register API Controller (CoffeeShop)
25:57 - Add CoffeeShops to the Database
29:18 - Add an empty ASP.NET Web Project to the Solution
31:03 - Install IdentityServer4 Dependencies
35:48 - Create IdentityServer migrations
37:47 - Update the IdentityServer Databases
38:55 - Add ASP.NET Identity to the Server project
41:55 – Add ASP.NET Identity migrations
44:33 - Add IdentityServer4 Configuration and SeedData
51:41 - Setup the IdentityServer Seeding process
55:49 - Setup the IdentityServer authentication flow
56:53 - Update IdentityServer QuickStart code
Credits:
- Many thanks to Kevin Jones from Rock Solid Knowledge and his comprehensive tutorial series on IdentityServer.
👍If you enjoyed this tutorial, please like this video consider subscribing for more content like this!
By the end of this tutorial, you will:
- Be able to integrate ASP.NET Identity with IdentityServer4
- Understand the components of a fully-secured .NET 6 application
- Understand the installation process for an IdentityServer4 project
- Be able to install the dependencies necessary for IdentityServer4
Steps:
Part 1: Setup the API
1. Create a new ASP.NET Core Empty project
2. Setup a ClassLibrary project for the Database
- Install-Package Microsoft.EntityFrameworkCore.SqlServer -Version 6.0.1
- Install-Package Microsoft.EntityFrameworkCore.Tools -Version 6.0.1
3. Add and Migrate an entity with EntityFramework Core
4. Add a CoffeeShop Service and Model
5. Create and Register API Controller (CoffeeShop)
6. Add CoffeeShops to the Database
Part 2 - Setting up the Identity Server (Server) project
8. Add an empty ASP.NET Web Project to the Solution
9. Install IdentityServer4 Dependencies (written bellow so you can just copy-paste them in your package manager console in the Server project)
Install-Package IdentityServer4 -Version 4.1.2
Install-Package IdentityServer4.EntityFramework -Version 4.1.2
Install-Package Microsoft.EntityFrameworkCore.Tools -Version 6.0.1
Install-Package Microsoft.EntityFrameworkCore.SqlServer -Version 6.0.1
Install-Package Microsoft.AspNetCore.Identity.UI -Version 6.0.1
Install-Package IdentityServer4.AspNetIdentity -Version 4.1.2
Install-Package Microsoft.AspNetCore.Identity.EntityFrameworkCore -Version 6.0.1
12. Create IdentityServer migrations (Default project: Server)
13. Update the IdentityServer Databases
14. Add ASP.NET Identity to the Server project
15. Add ASP.NET Identity migrations (Server proj) and run them
Add-Migration InitialAspNetIdentityMigration -Context AspNetIdentityDbContext
Update-Database -Context AspNetIdentityDbContext
16. Add IdentityServer4 Configuration and SeedData
17. Setup the IdentityServer Seeding process
- dotnet run Server/bin/Debug/net6.0/Server /seed --project Server
18. Setup the IdentityServer authentication flow
19. Update IdentityServer QuickStart code
Useful Links:
0:00 – Intro
0:50 – Components of this tutorial
4:03 - Create a new ASP.NET Core Empty project
6:09 - Setup a ClassLibrary project for the Database
13:32 – Add and Migrate an entity with EntityFramework Core
20:00 - Add a CoffeeShop Service and Model
24:11 - Create and Register API Controller (CoffeeShop)
25:57 - Add CoffeeShops to the Database
29:18 - Add an empty ASP.NET Web Project to the Solution
31:03 - Install IdentityServer4 Dependencies
35:48 - Create IdentityServer migrations
37:47 - Update the IdentityServer Databases
38:55 - Add ASP.NET Identity to the Server project
41:55 – Add ASP.NET Identity migrations
44:33 - Add IdentityServer4 Configuration and SeedData
51:41 - Setup the IdentityServer Seeding process
55:49 - Setup the IdentityServer authentication flow
56:53 - Update IdentityServer QuickStart code
Credits:
- Many thanks to Kevin Jones from Rock Solid Knowledge and his comprehensive tutorial series on IdentityServer.
Комментарии