All token identifiers are now plain user ids

This commit is contained in:
Johannes Zellner
2016-06-03 12:54:59 +02:00
parent e06f5f88b8
commit 7057f1aaa2

View File

@@ -102,10 +102,6 @@ function initialize(callback) {
// passport put the 'info' object into req.authInfo, where we can further validate the scopes
var info = { scope: token.scope };
if (token.identifier.indexOf(tokendb.PREFIX_USER) === 0) {
token.identifier = token.identifier.slice(tokendb.PREFIX_USER.length);
}
userdb.get(token.identifier, function (error, user) {
if (error && error.reason === DatabaseError.NOT_FOUND) return callback(null, false);
if (error) return callback(error);