@sdflc/backend-helpers 1.0.81 → 1.0.82
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 +1 -1
- package/build/esm/BaseCore.js +2 -2
- package/package.json +1 -1
package/build/BaseCore.js
CHANGED
|
@@ -613,7 +613,7 @@ class BaseCore {
|
|
|
613
613
|
async extractCredentials(args) {
|
|
614
614
|
const { req, space, authorization } = args;
|
|
615
615
|
const token = req.cookies?.[space.cookieName] || authorization;
|
|
616
|
-
const fingerprint = req.cookies?.[space.fingerprintCookieName] || args.fingerprint || '';
|
|
616
|
+
const fingerprint = req.cookies?.[space.fingerprintCookieName] || req.headers?.[constants_1.HEADERS.FINGERPRINT] || args.fingerprint || '';
|
|
617
617
|
return {
|
|
618
618
|
token,
|
|
619
619
|
fingerprint,
|
package/build/esm/BaseCore.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Logger, ACCESS_RIGHTS, MeasureTool, StrOrderHelpers, LoggerLevels } fro
|
|
|
3
3
|
import check from 'check-types';
|
|
4
4
|
import { castArray } from 'lodash';
|
|
5
5
|
import { validateGet, validateGetMany, validateRemove, validateRemoveMany } from './commonValidators';
|
|
6
|
-
import { ACTIONS, DEFAULT_ORDER_NO, DEFAULT_ORDER_NO_STEP, FIELDS, ID_TYPES, ORDER_BYS } from './constants';
|
|
6
|
+
import { ACTIONS, DEFAULT_ORDER_NO, DEFAULT_ORDER_NO_STEP, FIELDS, HEADERS, ID_TYPES, ORDER_BYS } from './constants';
|
|
7
7
|
import { getDefaultJwtAlgorithm, getDefaultJwtIssuer, verifyUserToken } from './userToken';
|
|
8
8
|
const defaultValidate = ( /*args: any, opt?: BaseCoreActionsInterface*/) => {
|
|
9
9
|
return [true, {}];
|
|
@@ -607,7 +607,7 @@ class BaseCore {
|
|
|
607
607
|
async extractCredentials(args) {
|
|
608
608
|
const { req, space, authorization } = args;
|
|
609
609
|
const token = req.cookies?.[space.cookieName] || authorization;
|
|
610
|
-
const fingerprint = req.cookies?.[space.fingerprintCookieName] || args.fingerprint || '';
|
|
610
|
+
const fingerprint = req.cookies?.[space.fingerprintCookieName] || req.headers?.[HEADERS.FINGERPRINT] || args.fingerprint || '';
|
|
611
611
|
return {
|
|
612
612
|
token,
|
|
613
613
|
fingerprint,
|