From the course: Advanced Web APIs with ASP.NET Core in .NET 6
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Adding ASP.NET Core Identity - C# Tutorial
From the course: Advanced Web APIs with ASP.NET Core in .NET 6
Adding ASP.NET Core Identity
- [Lecturer] So far everyone may call our API. So the next step will be to restrict that a little bit. However, in order to be able to implement that, there are some preparations which we need to take. We are using ASP.NET Core Identity which is built into ASP.NET Core. And I would like to use the Razor Pages web project to demonstrate that. If we create a new project, and it doesn't really matter whether it's a Razor Pages or a MVC project or an API project, there is this authentication type setting. And of course that's also available via the .NET CLI. And if we set that to individual accounts then ASP.NET's Core identities automatically built in. So among other things, users can register and then log in and log out. However, I would like to show you how we can add this to the existing application here. So we're using the web project, and first of all, we need a new NuGet package. And the NuGet package is called…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Introduction31s
-
(Locked)
Enforcing HTTPS5m 16s
-
(Locked)
Consuming the API with JavaScript4m 44s
-
(Locked)
Cross-origin resource sharing (CORS)4m 12s
-
(Locked)
Enabling CORS4m 44s
-
(Locked)
Adding ASP.NET Core Identity6m 56s
-
(Locked)
Adding token-based authentication8m 51s
-
(Locked)
OAuth and OpenID Connect4m 19s
-
(Locked)
Securing the API with IdentityServer6m 10s
-
(Locked)
Consuming the protected API6m 40s
-
(Locked)
-