Added the begins of JWT authentication and JWT authorization middleware.
Created:
backend/middleware - (folder for middleware)
backend/middleware/check-auth.ts - (JWT user authorization middleware)
backend/types - (folder for typescript types)
backend/types/user.ts - (a user type for testing)
Changed:
server.ts - (rename route "authorization" to "user" | routes should be data driven)
user.ts - (added token signing to "/login" and added "/change_username" route to test middleware"
Added the begins of JWT authentication and JWT authorization middleware.
Created: backend/middleware - (folder for middleware) backend/middleware/check-auth.ts - (JWT user authorization middleware) backend/types - (folder for typescript types) backend/types/user.ts - (a user type for testing)
Changed: server.ts - (rename route "authorization" to "user" | routes should be data driven) user.ts - (added token signing to "/login" and added "/change_username" route to test middleware"
Renamed: backend/routes/authentication.ts -> backend/routes/user.ts