exodus-framework 2.0.801 → 2.0.802

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"authentication.d.ts","sourceRoot":"","sources":["../../src/middlewares/authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,OAAO,cAAc,EAAE,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErE,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAMtC,qBAAa,wBAAyB,SAAQ,cAAc;IAC1D,YAAY,CAAC,QAAQ,GAAE,OAAc,GAAG,cAAc;CAUvD;AAED,qBAAa,8BAA+B,SAAQ,gBAAgB;IAClE,YAAY,QAAe,eAAe,OAAO,cAAc,QAAQ,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,IAAI,mBAgGxF;CACH"}
1
+ {"version":3,"file":"authentication.d.ts","sourceRoot":"","sources":["../../src/middlewares/authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,OAAO,cAAc,EAAE,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErE,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAMtC,qBAAa,wBAAyB,SAAQ,cAAc;IAC1D,YAAY,CAAC,QAAQ,GAAE,OAAc,GAAG,cAAc;CAUvD;AAED,qBAAa,8BAA+B,SAAQ,gBAAgB;IAClE,YAAY,QAAe,eAAe,OAAO,cAAc,QAAQ,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,IAAI,mBAiGxF;CACH"}
@@ -28,7 +28,7 @@ class AuthenticationMiddleware extends _controller.default {
28
28
  exports.AuthenticationMiddleware = AuthenticationMiddleware;
29
29
  class SocketAuthenticationMiddleware extends _controller.SocketController {
30
30
  decryptToken = async (req, res, next) => {
31
- const token = req.headers.authorization;
31
+ const token = req.headers.authorization ? req.headers.authorization.replace('Bearer ', '') : '';
32
32
  const tenantId = req.headers['X-Exodus-Tenant-ID'];
33
33
  const applicationId = req.headers['X-Exodus-Application-ID'];
34
34
  let isApplication = false;
@@ -109,6 +109,7 @@ class SocketAuthenticationMiddleware extends _controller.SocketController {
109
109
  req.isApplication = isApplication;
110
110
  next();
111
111
  } catch (error) {
112
+ error.code = 500;
112
113
  next(error);
113
114
  }
114
115
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exodus-framework",
3
- "version": "2.0.801",
3
+ "version": "2.0.802",
4
4
  "description": "Exodus Framework",
5
5
  "author": "jhownpaixao",
6
6
  "license": "ISC",