Skip to content

In this repository, we implement authentication and authorization using JWT in a new Asp.NET 7 WebAPI project.

Notifications You must be signed in to change notification settings

mohammad-taheri1/YouTube-JwtAuthAspNet7WebAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

title last update
ASP.NET 7 Web API JWT Authentication and Role-Based Authorization
2023-Dec-17

ASP.NET 7 Web API JWT Authentication and Role-Based Authorization

What is this repository about?

JWT(Json Web Token) is one of the most popular ways to implement authentication and role-based authorization in WebAPI Projects. It uses claims and manage your security.

In this repository, we create a new .Net 7 WebAPI project from scratch and implement Fully authentication and authorization in it.

YouTube Tutorial Link:

https://www.youtube.com/watch?v=KRVjIgr-WOU

We use these packages:

  • "Microsoft.AspNetCore.Authentication.JwtBearer"
  • "Microsoft.AspNetCore.Identity.EntityFrameworkCore"
  • "Microsoft.EntityFrameworkCore.SqlServer"
  • "Microsoft.EntityFrameworkCore.Tools"

Link of used packages on nuget.org:

Topics covered in this repository:

  • Dtos
  • Static classes
  • Entities
  • Dependency injection
  • Refactoring
  • Git branches
  • Pull request
  • Identity Package
  • Custom User fields
  • Add request headers to swagger

💖 You can Buy me a coffee to support: https://www.buymeacoffee.com/DevEmpower 💖

Disclaimer: This repository is just a tutorial for beginners and it is not a commercial code. Use these Codes and functions on your responsibilities. Don’t forget that security is very important in any software and website and you must be aware of any functionality of codes of your projects.

About

In this repository, we implement authentication and authorization using JWT in a new Asp.NET 7 WebAPI project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages