From the course: ASP.NET: Security
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Authenticating against IdentityServer
From the course: ASP.NET: Security
Authenticating against IdentityServer
- [Instructor] Now that IdentityServer has been successfully set up, we would like to authenticate users within our application against that IdentityServer. How can we do that? Well, first of all, we need to configure the cookie middleware. We have a regular Web application, so, we will need to use cookies in order to maintain the information that the user's logged in. that manages this and takes care of everything. The basic implementation comes from Microsoft in their Owin middleware, so, we need to use the NuGet package manager to install the Microsoft.Owin.Security.Cookies package, and once we've done that, we can then go to our startup class and just say there that we would like to use that cookie authentication using the UseCookieAuthentication method that is provided by that package. With that setup, we then would like to configure the OpenID Connect middleware, remember, that's on top of Oauth, helping us with identity, and this will be done by loading the…
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.