Hands-On Full-Stack Web Development with ASP.NET Core
by Tamir Dresher, Amir Zuker, Shay Friedman
Summary
In this chapter, you've learned how to add a security layer to your backend server, which allows you to authenticate users and authorize their actions. Application security is a big and important topic, which, if done incorrectly, can expose your application data and your users' privacy to attacks and leakage. Authentication and authorization can help you make sure that users can only do what you have approved. ASP.NET Core provides the identity infrastructure, which takes advantage of the EF Core DbContext and adds necessary entities to your data model. After you enabled the identity infrastructure, I showed you how to add authentication and generate a JWT that holds the user's claims. Afterwards, you saw how to use these claims ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access