diff --git a/lib/modules/authenticator/index.js b/lib/modules/authenticator/index.js index dc634a39..8a6e6c8f 100644 --- a/lib/modules/authenticator/index.js +++ b/lib/modules/authenticator/index.js @@ -45,7 +45,7 @@ class Authenticator { (`http://${host}:${port}/embark?token=${this.authToken}`.underline))); }); - this.events.setCommandHandler('api:authorize', (token, cb) => { + this.events.setCommandHandler('authenticator:authorize', (token, cb) => { if (token !== this.authToken) { return cb(ERROR_OBJ); } diff --git a/lib/modules/webserver/server.js b/lib/modules/webserver/server.js index c9c3611e..c03caa5f 100644 --- a/lib/modules/webserver/server.js +++ b/lib/modules/webserver/server.js @@ -167,7 +167,7 @@ class Server { } applyAPIFunction (cb, req, res) { - this.events.request('api:authorize', req.headers.authorization, (err) => { + this.events.request('authenticator:authorize', req.headers.authorization, (err) => { if (err) { const send = res.send ? res.send.bind(res) : req.send.bind(req); // WS only has the first params return send(err);