@flink-app/generic-auth-plugin 0.4.7 → 0.5.0
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/.flink/generatedHandlers.ts +1 -1
- package/.flink/generatedJobs.ts +1 -1
- package/.flink/generatedRepos.ts +1 -1
- package/.flink/schemas/schemas.ts +1 -1
- package/.flink/start.ts +1 -1
- package/dist/.flink/generatedHandlers.js +1 -1
- package/dist/.flink/generatedJobs.js +1 -1
- package/dist/.flink/generatedRepos.js +1 -1
- package/dist/.flink/start.js +1 -1
- package/dist/src/handlers/UserPasswordResetComplete.js +1 -1
- package/dist/src/handlers/UserPasswordResetStart.js +2 -2
- package/package.json +7 -7
- package/src/handlers/UserPasswordResetComplete.ts +1 -1
- package/src/handlers/UserPasswordResetStart.ts +4 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated Sat
|
|
1
|
+
// Generated Sat Mar 25 2023 15:16:41 GMT+0100 (Central European Standard Time)
|
|
2
2
|
import { autoRegisteredHandlers, HttpMethod } from "@flink-app/flink";
|
|
3
3
|
import * as UserCreate_0 from "../src/handlers/UserCreate";
|
|
4
4
|
import * as UserLogin_0 from "../src/handlers/UserLogin";
|
package/.flink/generatedJobs.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated Sat
|
|
1
|
+
// Generated Sat Mar 25 2023 15:16:41 GMT+0100 (Central European Standard Time)
|
|
2
2
|
import { autoRegisteredJobs } from "@flink-app/flink";
|
|
3
3
|
export const jobs = [];
|
|
4
4
|
autoRegisteredJobs.push(...jobs);
|
package/.flink/generatedRepos.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated Sat
|
|
1
|
+
// Generated Sat Mar 25 2023 15:16:41 GMT+0100 (Central European Standard Time)
|
|
2
2
|
import { autoRegisteredRepos } from "@flink-app/flink";
|
|
3
3
|
export const repos = [];
|
|
4
4
|
autoRegisteredRepos.push(...repos);
|
|
@@ -30,7 +30,7 @@ import { PutManagementUserRolesByUseridRes } from "../../src/schemas/Management/
|
|
|
30
30
|
import { PutManagementUserUsernameByUseridReq } from "../../src/schemas/Management/PutUserUsernameByUseridReq";
|
|
31
31
|
import { PutManagementUserUsernameByUseridRes } from "../../src/schemas/Management/PutUserUsernameByUseridRes";
|
|
32
32
|
|
|
33
|
-
// Generated Sat
|
|
33
|
+
// Generated Sat Mar 25 2023 15:16:42 GMT+0100 (Central European Standard Time)
|
|
34
34
|
export interface UserCreate_7_ReqSchema extends UserCreateReq {}
|
|
35
35
|
|
|
36
36
|
export interface UserCreate_7_ResSchema extends UserCreateRes {}
|
package/.flink/start.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.handlers = void 0;
|
|
4
|
-
// Generated Sat
|
|
4
|
+
// Generated Sat Mar 25 2023 15:16:41 GMT+0100 (Central European Standard Time)
|
|
5
5
|
var flink_1 = require("@flink-app/flink");
|
|
6
6
|
exports.handlers = [];
|
|
7
7
|
flink_1.autoRegisteredHandlers.push.apply(flink_1.autoRegisteredHandlers, exports.handlers);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.jobs = void 0;
|
|
4
|
-
// Generated Sat
|
|
4
|
+
// Generated Sat Mar 25 2023 15:16:41 GMT+0100 (Central European Standard Time)
|
|
5
5
|
var flink_1 = require("@flink-app/flink");
|
|
6
6
|
exports.jobs = [];
|
|
7
7
|
flink_1.autoRegisteredJobs.push.apply(flink_1.autoRegisteredJobs, exports.jobs);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.repos = void 0;
|
|
4
|
-
// Generated Sat
|
|
4
|
+
// Generated Sat Mar 25 2023 15:16:41 GMT+0100 (Central European Standard Time)
|
|
5
5
|
var flink_1 = require("@flink-app/flink");
|
|
6
6
|
exports.repos = [];
|
|
7
7
|
flink_1.autoRegisteredRepos.push.apply(flink_1.autoRegisteredRepos, exports.repos);
|
package/dist/.flink/start.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// Generated Sat
|
|
3
|
+
// Generated Sat Mar 25 2023 15:16:41 GMT+0100 (Central European Standard Time)
|
|
4
4
|
require("./generatedHandlers");
|
|
5
5
|
require("./generatedRepos");
|
|
6
6
|
require("./generatedJobs");
|
|
@@ -50,7 +50,7 @@ var postPasswordResetCompleteHandler = function (_a) {
|
|
|
50
50
|
if (ctx.plugins.genericAuthPlugin.passwordResetSettings == null) {
|
|
51
51
|
return [2 /*return*/, flink_1.internalServerError("Password reset settings is needed to use password-reset")];
|
|
52
52
|
}
|
|
53
|
-
jwtSecret = ctx.plugins.
|
|
53
|
+
jwtSecret = ctx.plugins[pluginName].passwordResetSettings.code.jwtSecret;
|
|
54
54
|
return [4 /*yield*/, ctx.plugins.genericAuthPlugin.passwordResetComplete(repo, ctx.auth, jwtSecret, req.body.passwordResetToken, req.body.code, req.body.password, ctx.plugins.genericAuthPlugin.createPasswordHashAndSaltMethod)];
|
|
55
55
|
case 1:
|
|
56
56
|
resp = _b.sent();
|
|
@@ -58,14 +58,14 @@ var postPasswordResetStartHandler = function (_a) {
|
|
|
58
58
|
if (ctx.plugins.genericAuthPlugin.passwordResetSettings == null) {
|
|
59
59
|
return [2 /*return*/, flink_1.internalServerError("Password reset settings is needed to use /password/reset")];
|
|
60
60
|
}
|
|
61
|
-
_b = ctx.plugins.
|
|
61
|
+
_b = ctx.plugins[pluginName].passwordResetSettings.code, jwtSecret = _b.jwtSecret, numberOfDigits = _b.numberOfDigits, lifeTime = _b.lifeTime;
|
|
62
62
|
return [4 /*yield*/, ctx.plugins.genericAuthPlugin.passwordResetStart(repo, ctx.auth, jwtSecret, req.body.username, numberOfDigits, lifeTime)];
|
|
63
63
|
case 1:
|
|
64
64
|
resp = _d.sent();
|
|
65
65
|
if (resp.status != "success") {
|
|
66
66
|
return [2 /*return*/, { data: { status: resp.status } }];
|
|
67
67
|
}
|
|
68
|
-
emailSettings = ctx.plugins.
|
|
68
|
+
emailSettings = ctx.plugins[pluginName].passwordResetSettings.email;
|
|
69
69
|
emailCtx = {
|
|
70
70
|
code: resp.code,
|
|
71
71
|
passwordResetToken: resp.passwordResetToken,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flink-app/generic-auth-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Flink plugin that provides a generic user authentification solution.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\"",
|
|
@@ -16,19 +16,19 @@
|
|
|
16
16
|
"types": "dist/src/index.d.ts",
|
|
17
17
|
"main": "dist/src/index.js",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@flink-app/email-plugin": "^0.
|
|
20
|
-
"@flink-app/jwt-auth-plugin": "^0.
|
|
21
|
-
"@flink-app/management-api-plugin": "^0.
|
|
22
|
-
"@flink-app/sms-plugin": "^0.
|
|
19
|
+
"@flink-app/email-plugin": "^0.5.0",
|
|
20
|
+
"@flink-app/jwt-auth-plugin": "^0.5.0",
|
|
21
|
+
"@flink-app/management-api-plugin": "^0.5.0",
|
|
22
|
+
"@flink-app/sms-plugin": "^0.5.0",
|
|
23
23
|
"handlebars": "^4.7.7",
|
|
24
24
|
"jsonwebtoken": "^8.5.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@flink-app/flink": "^0.
|
|
27
|
+
"@flink-app/flink": "^0.5.0",
|
|
28
28
|
"@types/jsonwebtoken": "^8.5.2",
|
|
29
29
|
"@types/node": "^15.6.2",
|
|
30
30
|
"ts-node": "^9.1.1",
|
|
31
31
|
"typescript": "^4.2.4"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "3c877c210da19119c074c7482e97a485d2334e80"
|
|
34
34
|
}
|
|
@@ -25,7 +25,7 @@ const postPasswordResetCompleteHandler: Handler<
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const { jwtSecret /*, numberOfDigits, lifeTime*/ } =
|
|
28
|
-
|
|
28
|
+
(<any>ctx.plugins)[pluginName].passwordResetSettings.code;
|
|
29
29
|
|
|
30
30
|
const resp = await ctx.plugins.genericAuthPlugin.passwordResetComplete(
|
|
31
31
|
repo,
|
|
@@ -27,7 +27,9 @@ const postPasswordResetStartHandler: Handler<
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
const { jwtSecret, numberOfDigits, lifeTime } =
|
|
30
|
-
|
|
30
|
+
(<any>ctx.plugins)[pluginName].passwordResetSettings.code;
|
|
31
|
+
|
|
32
|
+
|
|
31
33
|
|
|
32
34
|
const resp = await ctx.plugins.genericAuthPlugin.passwordResetStart(
|
|
33
35
|
repo,
|
|
@@ -43,7 +45,7 @@ const postPasswordResetStartHandler: Handler<
|
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
const emailSettings =
|
|
46
|
-
|
|
48
|
+
(<any>ctx.plugins)[pluginName].passwordResetSettings.email;
|
|
47
49
|
|
|
48
50
|
const emailCtx = {
|
|
49
51
|
code: resp.code,
|