🛠️ Refactor Authentication
Description
The current authentication implementation in the UserOrg component needs to be refactored to align with modern best practices in .NET Identity. This includes:
-
Migration to JWT-based Authentication
Replace the existing authentication mechanism with a secure and scalable JWT token-based approach using .NET Identity. -
RBAC Matrix Refactor
Rework the current Role-Based Access Control (RBAC) matrix implementation to leverage .NET Identity policies. This will improve maintainability, scalability, and integration with ASP.NET Core's built-in authorization system.
Goals
- Improve security and maintainability of the authentication flow.
- Simplify role and permission management using policy-based authorization.
Tasks
-
Implement JWT token validation. -
Integrate JWT authentication with .NET Identity. -
Refactor RBAC matrix to use IAuthorizationPolicyProviderand custom policies. -
Update UserOrgcomponent to use the new authentication and authorization logic. -
Add unit and integration tests for the new authentication flow.
References
Edited by Jan Křenek
