September 2018
Intermediate to advanced
764 pages
20h 6m
English
Now that we have updated our existing tests, it's time to update our implementation to make the tests pass again. Let's start with updating the Create User JSON schema, replacing the password property with the digest property:
{ "properties": { "email": { ... }, "digest": { "type": "string" }, "profile": { ... } }, "required": ["email", "digest"],}
However, it is not enough to simply validate the data type of the digest property; we need to check that the digest string is a legitimate bcrypt digest. Fortunately, all bcrypt digests have the same general structure:

Therefore, we can use the following regular ...
Read now
Unlock full access