@authme/liveness 2.2.1 → 2.3.1-rc.3
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/index.cjs
CHANGED
|
@@ -9,30 +9,6 @@ var core = require('@authme/core');
|
|
|
9
9
|
var util = require('@authme/util');
|
|
10
10
|
require('core-js/modules/es.symbol.description.js');
|
|
11
11
|
|
|
12
|
-
class FasService extends engine.AuthmeEngineModuleBase {
|
|
13
|
-
constructor(engine$1) {
|
|
14
|
-
super(engine$1);
|
|
15
|
-
this.moduleName = engine.EngineModule.Fas;
|
|
16
|
-
}
|
|
17
|
-
setStage(stageList) {
|
|
18
|
-
const stageStrList = stageList.map(x => x.split('_')[1]);
|
|
19
|
-
return this.engine.run(this.moduleName, 'setStage', {
|
|
20
|
-
stageList: stageStrList
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
getStageParams(stageIndex) {
|
|
24
|
-
return this.engine.run(this.moduleName, 'getStageParams', {
|
|
25
|
-
stageIndex
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
setStageParams(stageIndex, value) {
|
|
29
|
-
return this.engine.run(this.moduleName, 'setStageParams', {
|
|
30
|
-
stageIndex,
|
|
31
|
-
value
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
12
|
/******************************************************************************
|
|
37
13
|
Copyright (c) Microsoft Corporation.
|
|
38
14
|
|
|
@@ -58,10 +34,45 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
58
34
|
});
|
|
59
35
|
}
|
|
60
36
|
|
|
37
|
+
class FasService extends engine.AuthmeEngineModuleBase {
|
|
38
|
+
constructor(engine$1) {
|
|
39
|
+
super(engine$1);
|
|
40
|
+
this.moduleName = engine.EngineModule.Fas;
|
|
41
|
+
}
|
|
42
|
+
setStage(stageList) {
|
|
43
|
+
const stageStrList = stageList.map(x => x.split('_')[1]);
|
|
44
|
+
return this.engine.run(this.moduleName, 'setStage', {
|
|
45
|
+
stageList: stageStrList
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
setPublicKeyForJson(pubKey) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
yield this.engine.setPublicKeyForJson(pubKey);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
getNormalizedFaceROI() {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
return yield this.engine.run(this.moduleName, 'getNormalizedFaceROI');
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
getStageParams(stageIndex) {
|
|
59
|
+
return this.engine.run(this.moduleName, 'getStageParams', {
|
|
60
|
+
stageIndex
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
setStageParams(stageIndex, value) {
|
|
64
|
+
return this.engine.run(this.moduleName, 'setStageParams', {
|
|
65
|
+
stageIndex,
|
|
66
|
+
value
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
61
71
|
const init = url => Immediately => __awaiter(void 0, void 0, void 0, function* () {
|
|
62
72
|
return core.sendRequest(url, 'POST', {
|
|
63
73
|
body: JSON.stringify({
|
|
64
|
-
Immediately
|
|
74
|
+
Immediately,
|
|
75
|
+
encrypt: true
|
|
65
76
|
})
|
|
66
77
|
});
|
|
67
78
|
});
|
|
@@ -136,7 +147,7 @@ exports.LivenessResultStatus = void 0;
|
|
|
136
147
|
})(exports.LivenessResultStatus || (exports.LivenessResultStatus = {}));
|
|
137
148
|
|
|
138
149
|
var name = "@authme/liveness";
|
|
139
|
-
var version$1 = "2.
|
|
150
|
+
var version$1 = "2.3.1-rc.3";
|
|
140
151
|
var peerDependencies = {
|
|
141
152
|
"core-js": "^3.6.0"
|
|
142
153
|
};
|
|
@@ -153,28 +164,28 @@ const version = packageInfo.version;
|
|
|
153
164
|
window[Symbol.for('authme-sdk')][packageInfo.name] = version;
|
|
154
165
|
|
|
155
166
|
Object.defineProperty(exports, 'EAuthMeEyeStatus', {
|
|
156
|
-
|
|
157
|
-
|
|
167
|
+
enumerable: true,
|
|
168
|
+
get: function () { return engine.EAuthMeEyeStatus; }
|
|
158
169
|
});
|
|
159
170
|
Object.defineProperty(exports, 'EAuthMeFASServiceStage', {
|
|
160
|
-
|
|
161
|
-
|
|
171
|
+
enumerable: true,
|
|
172
|
+
get: function () { return engine.EAuthMeFASServiceStage; }
|
|
162
173
|
});
|
|
163
174
|
Object.defineProperty(exports, 'EAuthMeFaceAntiSpoofingStatus', {
|
|
164
|
-
|
|
165
|
-
|
|
175
|
+
enumerable: true,
|
|
176
|
+
get: function () { return engine.EAuthMeFaceAntiSpoofingStatus; }
|
|
166
177
|
});
|
|
167
178
|
Object.defineProperty(exports, 'EAuthMeFacePose', {
|
|
168
|
-
|
|
169
|
-
|
|
179
|
+
enumerable: true,
|
|
180
|
+
get: function () { return engine.EAuthMeFacePose; }
|
|
170
181
|
});
|
|
171
182
|
Object.defineProperty(exports, 'EAuthMeMouthStatus', {
|
|
172
|
-
|
|
173
|
-
|
|
183
|
+
enumerable: true,
|
|
184
|
+
get: function () { return engine.EAuthMeMouthStatus; }
|
|
174
185
|
});
|
|
175
186
|
Object.defineProperty(exports, 'FasRecognitionResult', {
|
|
176
|
-
|
|
177
|
-
|
|
187
|
+
enumerable: true,
|
|
188
|
+
get: function () { return engine.EAuthMeFASServiceStatus; }
|
|
178
189
|
});
|
|
179
190
|
exports.FasService = FasService;
|
|
180
191
|
exports.LivenessAPI = LivenessAPI;
|
package/index.js
CHANGED
|
@@ -6,30 +6,6 @@ import { sendRequest } from '@authme/core';
|
|
|
6
6
|
import { dataURItoBlob } from '@authme/util';
|
|
7
7
|
import 'core-js/modules/es.symbol.description.js';
|
|
8
8
|
|
|
9
|
-
class FasService extends AuthmeEngineModuleBase {
|
|
10
|
-
constructor(engine) {
|
|
11
|
-
super(engine);
|
|
12
|
-
this.moduleName = EngineModule.Fas;
|
|
13
|
-
}
|
|
14
|
-
setStage(stageList) {
|
|
15
|
-
const stageStrList = stageList.map(x => x.split('_')[1]);
|
|
16
|
-
return this.engine.run(this.moduleName, 'setStage', {
|
|
17
|
-
stageList: stageStrList
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
getStageParams(stageIndex) {
|
|
21
|
-
return this.engine.run(this.moduleName, 'getStageParams', {
|
|
22
|
-
stageIndex
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
setStageParams(stageIndex, value) {
|
|
26
|
-
return this.engine.run(this.moduleName, 'setStageParams', {
|
|
27
|
-
stageIndex,
|
|
28
|
-
value
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
9
|
/******************************************************************************
|
|
34
10
|
Copyright (c) Microsoft Corporation.
|
|
35
11
|
|
|
@@ -55,10 +31,45 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
55
31
|
});
|
|
56
32
|
}
|
|
57
33
|
|
|
34
|
+
class FasService extends AuthmeEngineModuleBase {
|
|
35
|
+
constructor(engine) {
|
|
36
|
+
super(engine);
|
|
37
|
+
this.moduleName = EngineModule.Fas;
|
|
38
|
+
}
|
|
39
|
+
setStage(stageList) {
|
|
40
|
+
const stageStrList = stageList.map(x => x.split('_')[1]);
|
|
41
|
+
return this.engine.run(this.moduleName, 'setStage', {
|
|
42
|
+
stageList: stageStrList
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
setPublicKeyForJson(pubKey) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
yield this.engine.setPublicKeyForJson(pubKey);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
getNormalizedFaceROI() {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
return yield this.engine.run(this.moduleName, 'getNormalizedFaceROI');
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
getStageParams(stageIndex) {
|
|
56
|
+
return this.engine.run(this.moduleName, 'getStageParams', {
|
|
57
|
+
stageIndex
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
setStageParams(stageIndex, value) {
|
|
61
|
+
return this.engine.run(this.moduleName, 'setStageParams', {
|
|
62
|
+
stageIndex,
|
|
63
|
+
value
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
58
68
|
const init = url => Immediately => __awaiter(void 0, void 0, void 0, function* () {
|
|
59
69
|
return sendRequest(url, 'POST', {
|
|
60
70
|
body: JSON.stringify({
|
|
61
|
-
Immediately
|
|
71
|
+
Immediately,
|
|
72
|
+
encrypt: true
|
|
62
73
|
})
|
|
63
74
|
});
|
|
64
75
|
});
|
|
@@ -133,7 +144,7 @@ var LivenessResultStatus;
|
|
|
133
144
|
})(LivenessResultStatus || (LivenessResultStatus = {}));
|
|
134
145
|
|
|
135
146
|
var name = "@authme/liveness";
|
|
136
|
-
var version$1 = "2.
|
|
147
|
+
var version$1 = "2.3.1-rc.3";
|
|
137
148
|
var peerDependencies = {
|
|
138
149
|
"core-js": "^3.6.0"
|
|
139
150
|
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authme/liveness",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1-rc.3",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"core-js": "^3.6.0",
|
|
6
|
-
"@authme/core": "2.
|
|
7
|
-
"@authme/util": "2.
|
|
8
|
-
"@authme/engine": "2.
|
|
6
|
+
"@authme/core": "2.3.1-rc.3",
|
|
7
|
+
"@authme/util": "2.3.1-rc.3",
|
|
8
|
+
"@authme/engine": "2.3.1-rc.3"
|
|
9
9
|
},
|
|
10
10
|
"module": "./index.js",
|
|
11
11
|
"main": "./index.cjs",
|
|
@@ -2,6 +2,7 @@ import { AuthMeRectFloat } from '@authme/engine';
|
|
|
2
2
|
import { EAuthMeEyeStatus, EAuthMeFaceAntiSpoofingStatus, EAuthMeFacePose, EAuthMeFASServiceStage, EAuthMeMouthStatus, FasRecognitionResult } from '../enum';
|
|
3
3
|
export interface FasResult {
|
|
4
4
|
info: AuthMeFASServiceInfo;
|
|
5
|
+
iIsKeyFrame: 0 | 1;
|
|
5
6
|
eStatus: FasRecognitionResult;
|
|
6
7
|
eStage: EAuthMeFASServiceStage;
|
|
7
8
|
}
|
|
@@ -4,6 +4,8 @@ import { FasResult } from './interface';
|
|
|
4
4
|
export declare class FasService extends AuthmeEngineModuleBase<FasResult> {
|
|
5
5
|
constructor(engine: MlEngine);
|
|
6
6
|
setStage(stageList: EAuthMeFASServiceStage[]): Promise<unknown>;
|
|
7
|
+
setPublicKeyForJson(pubKey: string): Promise<void>;
|
|
8
|
+
getNormalizedFaceROI(): Promise<unknown>;
|
|
7
9
|
getStageParams(stageIndex: number): Promise<{
|
|
8
10
|
applyFAS: 0 | 1;
|
|
9
11
|
fThreshold: number;
|