September 2018
Intermediate to advanced
764 pages
20h 6m
English
Now that we have decided to attach our token using the Authorization header with the Bearer scheme, our next action is to write the tests for this authentication system. For our use cases, let's say that all endpoints that alter a user's document (that is, all POST, PATCH, and PUT requests except /login) will require a token where the sub property matches the ID of the user.
As always, we begin development by writing tests. Let's start with the Delete User endpoint, which should respond with the following:
Read now
Unlock full access