High-Table-Consortium / fullstack-capstone-dockerized

0 stars 3 forks source link

Implement Authentication for Admin Users #15

Closed Tumelo2748 closed 1 month ago

Tumelo2748 commented 1 month ago

Description:

This PR adds authentication middleware for securing our applications using JWT.


Key Changes:

  1. Admin Controller:

    • Added registerAdmin and loginAdmin controllers to handle authentication logic.
  2. Middleware:

    • Added authenticateToken and isAdmin middleware to protect admin-only routes.

How Has This Been Tested?

Related Issue:

Checklist: