exodus-framework 2.0.56 → 2.0.57
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":"AACA,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,cAAM,wBAAyB,SAAQ,cAAc;IACnD,YAAY,EAAE,cAAc,
|
1
|
+
{"version":3,"file":"authentication.d.ts","sourceRoot":"","sources":["../../src/middlewares/authentication.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,cAAM,wBAAyB,SAAQ,cAAc;IACnD,YAAY,EAAE,cAAc,CAYzB;CACJ;AAED,eAAe,wBAAwB,CAAC"}
|
@@ -12,8 +12,13 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
12
12
|
class AuthenticationMiddleware extends _controller.default {
|
13
13
|
decryptToken = (0, _expressJwt.expressjwt)({
|
14
14
|
secret: async () => {
|
15
|
-
|
16
|
-
|
15
|
+
try {
|
16
|
+
const api = new _session.SessionAPI();
|
17
|
+
return (await api.getCertificate()).data;
|
18
|
+
} catch (error) {
|
19
|
+
this.log('Não foi possível obter o certificado de segurança.', 'danger');
|
20
|
+
return '';
|
21
|
+
}
|
17
22
|
},
|
18
23
|
issuer: _app.Core.settings.getAuthentication().issuer,
|
19
24
|
algorithms: ['RS256']
|