mark token as claimed if a socket already exists

This commit is contained in:
AJ ONeal 2018-06-21 19:59:44 +00:00
parent a9353a9a75
commit 5d065c8bd0
1 changed files with 5 additions and 0 deletions

View File

@ -244,6 +244,11 @@ module.exports.authenticate = function (opts) {
opts.auth = auth.authz;
auth.resolve = null;
auth.reject = null;
// NOTE XXX: This is premature in the sense that we can't be 100% sure
// that the client is still on the other end. We'll need to implement some
// sort of check that the client actually received the token
// (i.e. when the grant event gets an ack)
auth._claimed = true;
return state.defaults.authenticate(opts.auth).then(resolve);
};
auth.reject = function (err) {