In the backend
folder you can find a skeleton for a simple app. These assignments require you to modify and add code as needed. You should also add test cases when you think that's appropriate.
Make sure that users are stored in the database in a safe way. How would you store passwords? You can add 3rd party libraries and new properties to User model if needed.
How would you validate that user is logging in with the correct password? Implement the function checkPassword
according to specification in the User model code.
Implement addRoles
function according to specification in the User model code.
Creating users with existing username should result to error Username xx is already taken
.
When listing users with
GET /users
GET /users/:id
Make sure passwords (and other non-public properties) are not sent. Hint: check serverbone codebase.
Make a simple frontend app: 'admin' GUI for the previously built backend using BackboneJS or React or both. With the app, you should be able to create new users and list created users.