.NET REST API Sicurezza Informatica

REST API and JWT Masterclass with .NET 8

Implement complete JWT in ASP.NET Core .NET 8: login endpoint, token issuance, claims, CORS policy and REST endpoint protection.

Course description

REST API and JWT with .NET 8: Stateless Authentication from Scratch to Production

JWT authentication is the de facto standard for modern REST APIs — and truly understanding how it works, not just copying configuration from Stack Overflow, makes the difference between a secure implementation and one full of holes. In this series we build from scratch a REST API in ASP.NET Core .NET 8 with complete JWT authentication: login, token issuance, claims, endpoint protection and everything you need in a real project.

What You'll Learn

  • Structure a REST API project in C# with .NET 8 and define the first endpoints
  • Configure the JWT Authentication Bearer library with all the essential options
  • Set up the CORS Policy to allow requests from frontends and local environments
  • Create a login endpoint and test it with Postman
  • Issue JWT tokens with expiration, signature and custom claims structure
  • Implement an authentication filter to protect reserved endpoints
  • Test the complete flow: login → token → authenticated call

Stateless Security: Understand Before Implementing

Each lesson explains not just what to do, but why. JWT is powerful but has well-known pitfalls — poorly managed expiration, weak secret keys, excessive claims. I show you how to avoid them with conscious choices, not magic copied from templates. At the end of the series you have a working REST API with authentication and a solid mental model to extend it.

Who This Course Is For

Designed for .NET developers who are already comfortable with C# and basic REST APIs, and want to add JWT authentication correctly. This is not a course for those starting from scratch with .NET.

Lessons list

Let's create a REST API project from scratch in C# with .NET 8 and Visual Studio: we'll structure the project and define the first endpoints — the starting point before adding JWT authentication.

Guarda lezione

I'll configure the JWT Authentication Bearer library in ASP.NET Core .NET 8, walking through all the key options to make stateless authentication work correctly in the REST API.

Guarda lezione

Let's set up the CORS Policy for the .NET 8 REST API: I'll define rules to allow requests from Angular, React frontends, or local development environments using Postman.

Guarda lezione

I'll build the login endpoint for the .NET 8 REST API and test it with Postman: we'll see how to handle the authentication request and prepare the ground for JWT token issuance.

Guarda lezione

Let's issue a JWT token from the .NET 8 REST API: I'll show you how to structure the claims, sign the token with the secret key, and configure the expiration time securely.

Guarda lezione

I'll implement the JWT authentication filter in ASP.NET Core .NET 8 to protect restricted endpoints, then test the complete flow — login, token issuance, authenticated call — end to end with Postman.

Guarda lezione
Giovanni Pace

Giovanni Pace

Ingegnere Informatico · Pratola Peligna

  • 107 Courses
About the teacher

Sono un ingegnere informatico con oltre 15 anni di esperienza nel settore ICT. Mi occupo di sviluppo software, cybersecurity, data science e intelligenza artificiale, con particolare attenzione all’innovazione e all’automazione dei processi aziendali. Da anni svolgo anche attività di docenza e formazione, creando percorsi pratici e coinvolgenti su programmazione, DevOps, AI e sicurezza informatica.

This course includes

  • Lessons 6
  • Duration 1h 6m
  • Difficulty intermedio
  • Language it
  • Certificate No

Recently viewed