abdullahkhanjmm / dotnet-roadmap-2024

0 stars 0 forks source link

JWT Authentication with Advanced Features #10

Closed abdullahkhanjmm closed 1 month ago

abdullahkhanjmm commented 1 month ago

JWT Authentication with Advanced Features

In this project, we implement Authentication using JWT Token with advanced features, without relying on any third-party packages other than the one provided by Microsoft.

Overview

User Account Lockout:

Password Complexity Requirements:

Token Revocation:

-Implement the ability to revoke JWT tokens in case of compromised accounts or lost devices. Revoked tokens should not be accepted, even if they are still within their expiration period.

Access Control Lists (ACLs):

Implementation Steps

Install the Microsoft JWT Package:

Configure JWT Authentication:

Account Lockout:

Password Complexity and Expiry:

Token Revocation:

Access Control Lists (ACLs):

Example Usage

Here's an example of how to use JWT Authentication with advanced features in your ASP.NET Core application:

[Authorize(Roles = "Admin")]
public class AdminController : ControllerBase
{
    [HttpGet("admin-dashboard")]
    public IActionResult AdminDashboard()
    {
        // Your admin dashboard logic here
    }
}
JMMAwais commented 1 month ago

https://github.com/JMMAwais/JWT_Authentication

asifaliwork commented 1 month ago

https://github.com/asifaliwork/JWTTokenAuthenticaton

asifaliwork commented 1 month ago

https://github.com/asifaliwork/JWTTokenAuthenticaton

(Update Refresh Token)