Add rest of user model fields to api.

First step to moving user interactions to api.
This commit is contained in:
Adam Shimali
2016-01-19 11:38:29 +00:00
parent 6c7fb42272
commit f839bae1f5
10 changed files with 193 additions and 48 deletions

10
app/encryption.py Normal file
View File

@@ -0,0 +1,10 @@
from flask.ext.bcrypt import generate_password_hash, check_password_hash
def hashpw(password):
return generate_password_hash(password.encode('UTF-8'), 10)
def check_hash(password, hashed_password):
# If salt is invalid throws a 500 should add try/catch here
return check_password_hash(hashed_password, password)