AhmedDiaab / role-based-auth-poc

Rolebased Authorization Applied in typescript task that uses Strategy Pattern

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Role-Based Authorization Strategy Pattern

Overview

In this task, you will be implementing the strategy pattern to handle role-based authorization in a TypeScript project. The strategy pattern allows you to dynamically select an authorization strategy based on the user's role, providing a flexible and extensible solution for managing access control.

Requirements

  • Basic knowledge of TypeScript and object-oriented programming concepts.
  • Familiarity with role-based authorization systems.
  • Use typescript to apply this task.
  • GitHub account to access the project repository.

Task Details

  1. Fork the GitHub repository role-based-authorization to your own GitHub account.
  2. Clone the forked repository to your local development environment.
  3. Create roles you will build your project based on, hint (admin, user).
  4. Figure out how you will give access/permissions to that role.
  5. Attach permissions to roles.
  6. Create index.ts that you test and call every role.

Bonus Tasks (Optional)

  • Add a new role to the system and implement the corresponding authorization strategy class.
  • Explore how you can make the authorization strategy selection dynamic based on factors other than just the user's role (e.g., time-based strategies, location-based strategies, etc.).
  • Enhance the project's documentation by updating the README.md file with clear instructions on how to set up and run the project.

About

Rolebased Authorization Applied in typescript task that uses Strategy Pattern

License:GNU General Public License v3.0