Commit Graph

8 Commits

Author SHA1 Message Date
Ritchie Martori 1dac9ada0b Fix logout to handle no or missing accessToken
Return 401 when the request does not provide any accessToken argument
or the token was not found.

Also simplify the implementation of the `logout` method to make only
a single database call (`deleteById`) instead of `findById` + `delete`.
2017-01-30 10:39:40 +01:00
Miroslav Bajtoš afd6dd7073 Preserve current session when invalidating tokens
Fix User model to preserve the current session (provided via
"options.accessToken") when invalidating access tokens after a change
of email or password property.
2017-01-16 11:02:29 +01:00
Miroslav Bajtoš 895629632f test: use local registry in test fixtures
Use local registry in test fixtures to prevent collision in globally
shared models.

Fix issues discoverd in auth implementation where the global registry
was used instead of the correct local one.
2016-07-27 15:06:32 +02:00
Simon Ho 25ade96d27 Backport separate error checking and done logic 2016-05-06 14:07:38 -07:00
Ryan Graham 4d6f2e7ab7
update/insert copyright notices 2016-05-03 17:10:46 -07:00
Ryan Graham 17bd101691 ensure app is booted before integration tests 2016-02-04 16:12:27 +01:00
Simon Ho 26af1472e7 Check configs for shared method settings 2015-09-28 16:27:48 -07:00
Raymond Feng bdc741520e Disable inclusion of User.accessTokens 2015-04-20 11:44:07 -07:00