mirror of
https://git.coolaj86.com/coolaj86/telebit-relay.js.git
synced 2025-04-22 03:20:37 +00:00
mark token as claimed if a socket already exists
This commit is contained in:
parent
a9353a9a75
commit
5d065c8bd0
@ -244,6 +244,11 @@ module.exports.authenticate = function (opts) {
|
|||||||
opts.auth = auth.authz;
|
opts.auth = auth.authz;
|
||||||
auth.resolve = null;
|
auth.resolve = null;
|
||||||
auth.reject = 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);
|
return state.defaults.authenticate(opts.auth).then(resolve);
|
||||||
};
|
};
|
||||||
auth.reject = function (err) {
|
auth.reject = function (err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user