@midwayjs/passport 3.19.2 → 4.0.0-alpha.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/dist/configuration.js
CHANGED
|
@@ -18,6 +18,7 @@ let PassportConfiguration = class PassportConfiguration {
|
|
|
18
18
|
await container.getAsync(authenticator_1.PassportAuthenticator);
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
+
exports.PassportConfiguration = PassportConfiguration;
|
|
21
22
|
__decorate([
|
|
22
23
|
(0, core_1.Inject)(),
|
|
23
24
|
__metadata("design:type", core_1.MidwayApplicationManager)
|
|
@@ -26,7 +27,7 @@ __decorate([
|
|
|
26
27
|
(0, core_1.Inject)(),
|
|
27
28
|
__metadata("design:type", core_1.MidwayConfigService)
|
|
28
29
|
], PassportConfiguration.prototype, "configService", void 0);
|
|
29
|
-
PassportConfiguration = __decorate([
|
|
30
|
+
exports.PassportConfiguration = PassportConfiguration = __decorate([
|
|
30
31
|
(0, core_1.Configuration)({
|
|
31
32
|
namespace: 'passport',
|
|
32
33
|
importConfigs: [
|
|
@@ -36,5 +37,4 @@ PassportConfiguration = __decorate([
|
|
|
36
37
|
],
|
|
37
38
|
})
|
|
38
39
|
], PassportConfiguration);
|
|
39
|
-
exports.PassportConfiguration = PassportConfiguration;
|
|
40
40
|
//# sourceMappingURL=configuration.js.map
|
|
@@ -417,6 +417,7 @@ let PassportAuthenticator = class PassportAuthenticator {
|
|
|
417
417
|
this._infoTransformers.push(fn);
|
|
418
418
|
}
|
|
419
419
|
};
|
|
420
|
+
exports.PassportAuthenticator = PassportAuthenticator;
|
|
420
421
|
__decorate([
|
|
421
422
|
(0, core_1.ApplicationContext)(),
|
|
422
423
|
__metadata("design:type", Object)
|
|
@@ -431,9 +432,8 @@ __decorate([
|
|
|
431
432
|
__metadata("design:paramtypes", []),
|
|
432
433
|
__metadata("design:returntype", void 0)
|
|
433
434
|
], PassportAuthenticator.prototype, "init", null);
|
|
434
|
-
PassportAuthenticator = __decorate([
|
|
435
|
+
exports.PassportAuthenticator = PassportAuthenticator = __decorate([
|
|
435
436
|
(0, core_1.Provide)(),
|
|
436
437
|
(0, core_1.Scope)(core_1.ScopeEnum.Singleton)
|
|
437
438
|
], PassportAuthenticator);
|
|
438
|
-
exports.PassportAuthenticator = PassportAuthenticator;
|
|
439
439
|
//# sourceMappingURL=authenticator.js.map
|
|
@@ -280,7 +280,7 @@ function PassportMiddleware(strategy) {
|
|
|
280
280
|
allFailed(options, failResult, req, res) {
|
|
281
281
|
// Strategies are ordered by priority. For the purpose of flashing a
|
|
282
282
|
// message, the first failure will be displayed.
|
|
283
|
-
let failure = failResult.failures[0] || {}, challenge =
|
|
283
|
+
let failure = failResult.failures[0] || {}, challenge = failure?.challenge || {}, msg;
|
|
284
284
|
// if (options.failureFlash) {
|
|
285
285
|
// let flash: any = options.failureFlash;
|
|
286
286
|
// if (typeof flash === 'string') {
|
|
@@ -401,7 +401,7 @@ function PassportMiddleware(strategy) {
|
|
|
401
401
|
__metadata("design:type", Object)
|
|
402
402
|
], InnerPassportMiddleware.prototype, "passportConfig", void 0);
|
|
403
403
|
__decorate([
|
|
404
|
-
(0, core_1.
|
|
404
|
+
(0, core_1.MainApp)(),
|
|
405
405
|
__metadata("design:type", Object)
|
|
406
406
|
], InnerPassportMiddleware.prototype, "app", void 0);
|
|
407
407
|
__decorate([
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/passport",
|
|
3
3
|
"description": "midway passport component",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.0-alpha.1",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "tsc",
|
|
14
14
|
"test": "node --require=ts-node/register ../../node_modules/jest/bin/jest.js",
|
|
15
|
-
"cov": "node
|
|
15
|
+
"cov": "node -r ts-node/register ../../node_modules/jest/bin/jest.js --runInBand --coverage --forceExit"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
18
|
"midway",
|
|
@@ -22,18 +22,19 @@
|
|
|
22
22
|
"author": "Nawbc",
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@midwayjs/core": "^
|
|
26
|
-
"@midwayjs/express": "^
|
|
27
|
-
"@midwayjs/jwt": "^
|
|
28
|
-
"@midwayjs/koa": "^
|
|
29
|
-
"@midwayjs/mock": "^
|
|
30
|
-
"@midwayjs/web": "^
|
|
25
|
+
"@midwayjs/core": "^4.0.0-alpha.1",
|
|
26
|
+
"@midwayjs/express": "^4.0.0-alpha.1",
|
|
27
|
+
"@midwayjs/jwt": "^4.0.0-alpha.1",
|
|
28
|
+
"@midwayjs/koa": "^4.0.0-alpha.1",
|
|
29
|
+
"@midwayjs/mock": "^4.0.0-alpha.1",
|
|
30
|
+
"@midwayjs/web": "^4.0.0-alpha.1",
|
|
31
31
|
"@types/passport-local": "1.0.38",
|
|
32
|
+
"after": "0.8.2",
|
|
32
33
|
"express-session": "1.18.1",
|
|
33
34
|
"passport-http-bearer": "1.0.1",
|
|
34
35
|
"passport-jwt": "4.0.1",
|
|
35
36
|
"passport-local": "1.0.0",
|
|
36
37
|
"passport-openidconnect": "0.1.2"
|
|
37
38
|
},
|
|
38
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "14bb4da91805a1cf52f190c0d37a74b395dd6372"
|
|
39
40
|
}
|