Now that we have Comeonin and the libraries to support bcrypting passwords in place, we need to actually hook it up to the rest of our application. This entails a few steps for us:
- We need to have Comeonin interact with our changesets to insert the encrypted password.
- We need to have the Controller check our password against the hash rather than the plaintext password.
It's pretty easy for us to implement this first step, so we'll start with this. Generally speaking, you should avoid adding any new code to your schemas unless it's something that is very specific to the shape of the data that is entering/leaving your database. Since this is taking information at the final step (just before inserting ...