Setup /session
* pseudo code spec
* setup handler
* install connect-redis
* rename auth.js to session.js in /test dir
(Almost) Setup POST /session
* change superagent to supertest (unrelated)
* setup spec
* authenticate user & check if passwords match
emails must be unique
Update DB Configs
* Add redis config
* Rename database file to mongo.js
Update dependencies
* add shouldjs
* add both superagent & supertest (to be used later)
Integration Test for /users
* duplicate users cant be created
* api responds w/ proper error
Session without spec
* needs way to be tested
* new notes page for notey
Implement Simple Token-Based Auth
1 User send email / password combo
2 Server response w/ temporary token (expires in 24 hours)
* Unit tests (needs refactoring)
* Session logic removed
Cleanup & Next Steps
* Will use mongoose 'population'
* Cleanup unused middleware code in server.js
* Add notes where needed
Setup GET /users/:id Spec
* Layout spec skeleton
* Add new route
* Add new helper
* Cleanup POST /login spec bug
Dry Up Specs
* Use usersSpecHelper to create a User before specs where necessary
* Use usersSpecHelper to remove Users before specs where necessary
dont respond w/ password when creating new account
Clean /users route
* better error handling
* authenticateUser func only checks if user exists (no authorization)
Requires Login Before Access GET /users/:id
* must match email & password combo to request user doc
* other get 401
fix bug; now checking for jwt using middleware
401 if invalid email for POST /login
Cannot receive JWT w/ invalid password
Cleanup References to userFactory
* pointers removed to prevent destructive var setting
Successfully Protected GET /users/:id
* questions remain on what to do w/ password
* include in token?
* how secure it JWT nodejs lib?
add spec reporter as default in mocha.opts