ShreyasDatta / BasicAuth-RBAC-IF-assignment

Basic Auth API with RBAC implemented | Hiring assignment for IF

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Role-based access control and Authentication API

Roadmap

  • connected the MongoDB Cluster to the Application
  • made a User model and corresponding registration schema and endpoint functions
  • added 3 heirarchy roles and corresponding scopes.
    • basic
      • can read Own data(resource/profile)
      • can update Own data(resource/profile)
    • supervisor
      • extends basic scope
      • can read Any data(resource/profile)
    • admin
      • extends basic and supervisor scope
      • can update Any data(resource/profile)
      • can delete Any data(resource/profile)
  • Following endpoints implemented:
    • User
        User / Sign up (no scope needed)
        User / Sign in (no scope needed)
        User / Get All (user-get)
        User / Get Single (user-get)
    • Role
        Role / Get All (readAny)
        Role / Get Single (readyAny{:id})
        Role / update Any (updateAny)
        Role / delete Any (deleteAny)
  • Further work on the remaining model and its endpoint functions pending:
    • School
        School / Get All (readAny)
        School / Get Students (readyAny{:id})
        School / Create (school-create)
    • Student
        Student / Create (student-create)
        Student / Get All (readAny)

About

Basic Auth API with RBAC implemented | Hiring assignment for IF


Languages

Language:JavaScript 98.0%Language:Shell 1.9%Language:Procfile 0.1%