Getting to know the core APIs of the Identity system
Here are the two core classes of the ASP.NET Core Identity system.
HttpContext and AuthenticationManager
The HttpContext
class is the core of ASP.NET Core. HttpContext
is the object that gives information about current requests and responses, for example, you can get information about the current request headers, query strings, request body, content type, and much more. This class is improvised in ASP.NET Core, and a few more methods have been introduced.
In terms of security, they have introduced a new property known as authentication that returns the AuthenticationManager
object. AuthenticationManager
provides some methods to check whether the user is authenticated and it performs user sign-in and sign-out operations.
Note
You can check out the latest AuthenticationManager
class on GitHub at https://github.com/aspnet/HttpAbstractions/blob/dev/src/Microsoft.AspNetCore.Http.Abstractions/Authentication/AuthenticationManager.cs.