@sdflc/backend-helpers 1.0.71 → 1.0.72
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.
package/build/BaseCore.js
CHANGED
|
@@ -719,7 +719,7 @@ class BaseCore {
|
|
|
719
719
|
return __awaiter(this, void 0, void 0, function* () {
|
|
720
720
|
const { req, space, authorization } = args;
|
|
721
721
|
const token = ((_a = req.cookies) === null || _a === void 0 ? void 0 : _a[space.cookieName]) || authorization;
|
|
722
|
-
const fingerprint = ((_b = req.cookies) === null || _b === void 0 ? void 0 : _b[space.fingerprintCookieName]) || '';
|
|
722
|
+
const fingerprint = ((_b = req.cookies) === null || _b === void 0 ? void 0 : _b[space.fingerprintCookieName]) || args.fingerprint || '';
|
|
723
723
|
return {
|
|
724
724
|
token,
|
|
725
725
|
fingerprint,
|
|
@@ -737,7 +737,13 @@ class BaseCore {
|
|
|
737
737
|
if (spaceResult !== true) {
|
|
738
738
|
return [spaceResult, space];
|
|
739
739
|
}
|
|
740
|
-
const { token, fingerprint } = yield this.extractCredentials({
|
|
740
|
+
const { token, fingerprint } = yield this.extractCredentials({
|
|
741
|
+
req,
|
|
742
|
+
authorization,
|
|
743
|
+
fingerprint: context.fingerprint,
|
|
744
|
+
space,
|
|
745
|
+
params,
|
|
746
|
+
});
|
|
741
747
|
const { jwtSecret, verifyTokenArgs } = yield this.getJwtTokenSecretAndSettings(params);
|
|
742
748
|
if (token && jwtSecret) {
|
|
743
749
|
const verifyResult = (0, userToken_1.verifyUserToken)(token, jwtSecret, Object.assign(Object.assign({}, verifyTokenArgs), { algorithms: (verifyTokenArgs === null || verifyTokenArgs === void 0 ? void 0 : verifyTokenArgs.algorithms) || [(0, userToken_1.getDefaultJwtAlgorithm)()], audience: (verifyTokenArgs === null || verifyTokenArgs === void 0 ? void 0 : verifyTokenArgs.audience) || space.id, issuer: (verifyTokenArgs === null || verifyTokenArgs === void 0 ? void 0 : verifyTokenArgs.issuer) || (0, userToken_1.getDefaultJwtIssuer)(), fingerprint }));
|
package/build/BaseGateway.js
CHANGED
|
@@ -297,7 +297,7 @@ class BaseGateway {
|
|
|
297
297
|
}
|
|
298
298
|
const shouldUseCache = useCache != null ? useCache : !this.config.noCache;
|
|
299
299
|
const fieldsToUse = !shouldUseCache && Array.isArray(this.config.selectFields) ? this.config.selectFields : this.getIdField();
|
|
300
|
-
const query = this.buildListQuery({ filter, params, fieldsToUse });
|
|
300
|
+
const query = this.buildListQuery({ filter, params, fieldsToUse, useCache: shouldUseCache });
|
|
301
301
|
yield this.onListFilter(query, filter);
|
|
302
302
|
if (limit && !isNaN(limit) && limit > 0) {
|
|
303
303
|
query.offset(offset).limit(limit);
|
package/package.json
CHANGED