Commit Graph

5 Commits

Author SHA1 Message Date
Zachary Wasserman
cd8057e860 Turn down logging in tests except after failure (#41)
When tests succeed, there is now no logging of DB queries or HTTP
requests. If a test fails, the logs will be output.
2016-08-04 21:10:23 -07:00
Mike Arpaia
4687812f39 Sessions in MySQL (#37)
* Sessions in MySQL

* Reclaiming some names

* session renewal without new cookies on every request

* comments and docstrings

* light organization in vc generation

* go vet

* endpoints for session management

* Merging @zwass' commit with mine

* Updating salt generation to use crypt/rand

* use getRandomText for session keys

* VC no longer needs a DB or to return an error

* getRandomText docstring

* Only use session via the SessionBackend API

* Set session backend with the request, similar to db
2016-08-04 15:38:13 -07:00
Zachary Wasserman
5c349a458d Eliminate DB globals + refactor tests (#39)
* Eliminate global DB connections. Instead, one connection is established (with the underlying object supporting pooling) and passed through the gin.Context. This allows test/prod to inject the appropriate DB object into the context.
* Refactor tests appropriately for this new style of DB connection
* Fix a bug in the routing caught by refactoring of tests
2016-08-04 11:41:47 -07:00
Mike Arpaia
24638413c4 Endpoint integration tests (#28)
* Quick fix where JWTRenewalMiddleware wasn't saving the update session to the client

* integration tests for all user/account management HTTP endpoints

close #15

* Combine checks in CheckUser

* Moving t.Fatals into utility functions

* Simplifying get user by id or username flow

* Fixing incorrect error log message

* Simplifying checkUser compare
2016-08-02 15:39:20 -07:00
Mike Arpaia
eee370e127 Authentication, authorization and user management (#10) 2016-08-01 16:32:20 -07:00