@midwayjs/passport 3.20.5 → 4.0.0-beta.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.
@@ -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 = (failure === null || failure === void 0 ? void 0 : failure.challenge) || {}, msg;
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.App)(),
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": "3.20.5",
4
+ "version": "4.0.0-beta.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 --require=ts-node/register ../../node_modules/.bin/jest --runInBand --coverage --forceExit"
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": "^3.20.4",
26
- "@midwayjs/express": "^3.20.4",
27
- "@midwayjs/jwt": "^3.20.5",
28
- "@midwayjs/koa": "^3.20.5",
29
- "@midwayjs/mock": "^3.20.4",
30
- "@midwayjs/web": "^3.20.4",
25
+ "@midwayjs/core": "^4.0.0-beta.1",
26
+ "@midwayjs/express": "^4.0.0-beta.1",
27
+ "@midwayjs/jwt": "^4.0.0-beta.1",
28
+ "@midwayjs/koa": "^4.0.0-beta.1",
29
+ "@midwayjs/mock": "^4.0.0-beta.1",
30
+ "@midwayjs/web": "^4.0.0-beta.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": "7ce57281bd3ef5d18dc50b47ff9bffb8a27c071e"
39
+ "gitHead": "832961ec3aff123c033197d8c00cb2bc9bad7ff8"
39
40
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2013 - Now midwayjs
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.