@servicelabsco/nestjs-utility-services 1.1.40 → 1.1.41
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":"app.controller.js","sourceRoot":"","sources":["../src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwD;AACxD,kDAA+C;
|
1
|
+
{"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwD;AACxD,kDAA+C;AAC/C,4EAAwE;AAGjE,IAAM,aAAa,GAAnB,MAAM,aAAa;IACtB,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAGrD,AAAN,KAAK,CAAC,GAAG;QACL,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IACvC,CAAC;IAQK,AAAN,KAAK,CAAC,iBAAiB;QACnB,OAAO,WAAI,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;IAGK,AAAN,KAAK,CAAC,GAAG,KAAI,CAAC;IAGR,AAAN,KAAK,CAAC,gBAAgB;QAClB,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;IAClC,CAAC;IAGK,AAAN,KAAK,CAAC,KAAK,CAAc,EAAU;QAC/B,OAAO,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC;CACJ,CAAA;AA1BS;IADL,IAAA,YAAG,GAAE;;;;wCAGL;AAQK;IADL,IAAA,YAAG,EAAC,UAAU,CAAC;;;;sDAGf;AAGK;IADL,IAAA,YAAG,EAAC,KAAK,CAAC;;;;wCACG;AAGR;IADL,IAAA,YAAG,EAAC,OAAO,CAAC;;;;qDAGZ;AAGK;IADL,IAAA,YAAG,EAAC,WAAW,CAAC;IACJ,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;0CAEvB;AA7BQ,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAEkC,4BAAY;GAD9C,aAAa,CA8BzB;AA9BY,sCAAa"}
|
@@ -15,7 +15,6 @@ const access_exception_1 = require("../../common/exceptions/access.exception");
|
|
15
15
|
const no_logged_user_exception_1 = require("../../common/exceptions/no.logged.user.exception");
|
16
16
|
const operation_exception_1 = require("../../common/exceptions/operation.exception");
|
17
17
|
const auth_1 = require("../../common/libraries/auth");
|
18
|
-
const custom_crypt_1 = require("../../common/libraries/custom.crypt");
|
19
18
|
const property_service_1 = require("../../system/services/property.service");
|
20
19
|
const auth_service_1 = require("../services/auth.service");
|
21
20
|
let InternalMiddleware = class InternalMiddleware {
|
@@ -27,12 +26,9 @@ let InternalMiddleware = class InternalMiddleware {
|
|
27
26
|
const credential = req.headers['x-internal-token'];
|
28
27
|
if (!credential)
|
29
28
|
throw new no_logged_user_exception_1.NoLoggedUserException();
|
30
|
-
const
|
31
|
-
if (!internalAuth)
|
32
|
-
throw new operation_exception_1.OperationException('Internal Auth key is not set');
|
33
|
-
const key = custom_crypt_1.CustomCrypt.decrypt(internalAuth);
|
29
|
+
const key = await this.propertyService.get('internal.server.key');
|
34
30
|
if (!key)
|
35
|
-
throw new operation_exception_1.OperationException('
|
31
|
+
throw new operation_exception_1.OperationException('Internal Auth key is not set');
|
36
32
|
if (key !== credential)
|
37
33
|
throw new access_exception_1.AccessException('Invalid credential');
|
38
34
|
const accessObject = await this.authService.getUserObject(2);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"internal.middleware.js","sourceRoot":"","sources":["../../../src/auth/middlewares/internal.middleware.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4D;AAE5D,+EAA2E;AAC3E,+FAAyF;AACzF,qFAAiF;AACjF,sDAAmD;
|
1
|
+
{"version":3,"file":"internal.middleware.js","sourceRoot":"","sources":["../../../src/auth/middlewares/internal.middleware.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4D;AAE5D,+EAA2E;AAC3E,+FAAyF;AACzF,qFAAiF;AACjF,sDAAmD;AAEnD,6EAAyE;AACzE,2DAAuD;AAShD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAM3B,YAA6B,WAAwB,EAAmB,eAAgC;QAA3E,gBAAW,GAAX,WAAW,CAAa;QAAmB,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAa5G,KAAK,CAAC,GAAG,CAAC,GAAQ,EAAE,GAAa,EAAE,IAAc;QAC7C,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;QACnD,IAAI,CAAC,UAAU;YAAE,MAAM,IAAI,gDAAqB,EAAE,CAAC;QAEnD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;QAClE,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,wCAAkB,CAAC,8BAA8B,CAAC,CAAC;QAEvE,IAAI,GAAG,KAAK,UAAU;YAAE,MAAM,IAAI,kCAAe,CAAC,oBAAoB,CAAC,CAAC;QAExE,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QAE7D,WAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAEzB,IAAI,EAAE,CAAC;IACX,CAAC;CACJ,CAAA;AAlCY,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;qCAOiC,0BAAW,EAAoC,kCAAe;GAN/F,kBAAkB,CAkC9B;AAlCY,gDAAkB"}
|
package/package.json
CHANGED