I know it's generally said that storing user credentials in plaintext is a horrible idea. I'm in the middle of implementing Basic Auth over SSL and was wondering what I should do with the user credentials once they're decrypted. Once I decrypt from the wire, I need to make sure the credentials match what's stored in the db. What's a secure way to get this done?
You need to store a hashed version of the password in your database. Upon receiving the password from the wire, you recompute the hash and check that it matches the stored version.
This shall be done this care. This answer explains it all.