This project demonstrates how to implement user management, authentication, and authorization in a C# Web API using JSON Web Tokens (JWT). The project is built using .NET 6.
To run this project, you will need:
- Visual Studio 2022 or later .NET 6 SDK
- Postman or a similar API development tool
- On this project Swagger is used
- .NET 6
- JWT (JSON Web Tokens)
- User management
- Authorization and authentication
- Clone the repository
- Open the solution in Visual Studio 2022 or newer
- Build the solution
- Run the project
- Register a new user
- Login with the registered user credentials
- Use the JWT token obtained from the login response to access authorized resources
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- jsonwebtoken library
- YouTube .NET 6 Web API 🔒 Role-Based Authorization with JSON Web Tokens (JWT) By patrick God
- Github
- ASP.NET Core JWT Authentication tutorial by Jason Watmore.