Add users table to database (ID, Username, Password, IsAdmin).
Add endpoint: POSTauth/register, to add username and hashed password to users table, first user added is set to isAdmin: true, every subsequent user is not.
Add JWT token issuing via endpoint: : POSTauth/login, token will contain user email, roles, and expiry time encoded into it. Password is hashed and compared to hashed password in the database.
Add
users
table to database (ID, Username, Password, IsAdmin).Add endpoint:
POST
auth/register
, to add username and hashed password tousers
table, first user added is set toisAdmin: true
, every subsequent user is not.Add JWT token issuing via endpoint: :
POST
auth/login
, token will contain user email, roles, and expiry time encoded into it. Password is hashed and compared to hashed password in the database.Update ERD documentation.