© Adam Freeman 2017

Adam Freeman, Pro ASP.NET Core MVC 2, https://doi.org/10.1007/978-1-4842-3150-0_29

29. Applying ASP.NET Core Identity

Adam Freeman

(1)London, UK

In this chapter, I show you how to apply ASP.NET Core Identity to authenticate and authorize the user accounts created in the previous chapter. Table 29-1 summarizes this chapter.

Table 29-1. Chapter Summary




Restrict access to an action method

Apply the Authorize attribute


Authenticate users

Create an Account controller that receives user credentials and check them using the UserManager class


Create and manage roles

Use the RoleManager class


Authorize access to an action method using roles

Add user accounts to roles and use the Authorize attribute to specify ...

Get Pro ASP.NET Core MVC 2 now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.