@konplit-services/common 1.10.0 → 1.10.1
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/app.configs.d.ts +2 -0
- package/build/app.configs.js +12 -0
- package/build/services/Jwt.js +1 -1
- package/package.json +1 -1
package/build/app.configs.d.ts
CHANGED
|
@@ -239,6 +239,8 @@ declare class AppConfigs {
|
|
|
239
239
|
constructor(processEnv: typeof env);
|
|
240
240
|
getAppName(): string;
|
|
241
241
|
getJWTKEY(): string;
|
|
242
|
+
get2FaJWTKEY(): string;
|
|
243
|
+
get2FaAccessTime(): string;
|
|
242
244
|
getTransactionJWTKEY(): string;
|
|
243
245
|
getDBURI(): string;
|
|
244
246
|
getActivityLogDBURI(): string;
|
package/build/app.configs.js
CHANGED
|
@@ -17,6 +17,18 @@ class AppConfigs {
|
|
|
17
17
|
}
|
|
18
18
|
return this.env.JWT_KEY;
|
|
19
19
|
}
|
|
20
|
+
get2FaJWTKEY() {
|
|
21
|
+
if (!this.env.TWOFA_JWT_KEY) {
|
|
22
|
+
throw new Error("TWOFA_JWT_KEY is required");
|
|
23
|
+
}
|
|
24
|
+
return this.env.TWOFA_JWT_KEY;
|
|
25
|
+
}
|
|
26
|
+
get2FaAccessTime() {
|
|
27
|
+
if (!this.env.ACCESS_2FA_TOKEN_IN) {
|
|
28
|
+
throw new Error("ACCESS_2FA_TOKEN_IN is required");
|
|
29
|
+
}
|
|
30
|
+
return this.env.ACCESS_2FA_TOKEN_IN;
|
|
31
|
+
}
|
|
20
32
|
getTransactionJWTKEY() {
|
|
21
33
|
if (!this.env.TRANSACTION_JWT_KEY) {
|
|
22
34
|
throw new Error("TRANSACTION_JWT_KEY is required");
|
package/build/services/Jwt.js
CHANGED
|
@@ -24,7 +24,7 @@ var JWTType;
|
|
|
24
24
|
const secret = process.env.JWT_KEY;
|
|
25
25
|
const transactionSecret = process.env.TRANSACTION_JWT_KEY;
|
|
26
26
|
const subscriptionSecret = process.env.SUBSCRIPTION_JWT_KEY;
|
|
27
|
-
const twoFactorSecret = process.env.
|
|
27
|
+
const twoFactorSecret = process.env.TWOFA_JWT_KEY;
|
|
28
28
|
class JWT {
|
|
29
29
|
static getToken(data_1) {
|
|
30
30
|
return __awaiter(this, arguments, void 0, function* (data, options = {}) {
|