mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Handle non-error responses from token function
This commit is contained in:
parent
7732d52583
commit
ea20342d76
@ -163,7 +163,9 @@ TokensStrategy.prototype.authenticate = function(req) {
|
|||||||
authenticateUserToken(req).then(user => {
|
authenticateUserToken(req).then(user => {
|
||||||
this.success(user,{scope:user.permissions});
|
this.success(user,{scope:user.permissions});
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
log.trace("token authentication failure: "+err.stack)
|
if (err) {
|
||||||
|
log.trace("token authentication failure: "+err.stack?err.stack:err)
|
||||||
|
}
|
||||||
this.fail(401);
|
this.fail(401);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user