@midwayjs/passport 2.14.2 → 2.14.4

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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.14.4](https://github.com/midwayjs/midway/compare/v2.14.3...v2.14.4) (2022-01-17)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Interrupt executions of middleware chaining after authenticatio… ([#1571](https://github.com/midwayjs/midway/issues/1571)) ([60a662c](https://github.com/midwayjs/midway/commit/60a662c83f7d6e1ece6c243a749014de2b7e046c))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [2.14.2](https://github.com/midwayjs/midway/compare/v2.14.1...v2.14.2) (2021-12-28)
7
18
 
8
19
 
@@ -160,6 +160,10 @@ let PassportService = class PassportService {
160
160
  }
161
161
  else {
162
162
  res.status(401);
163
+ const unAuthorizeError = new Error('UnAuthorized!');
164
+ unAuthorizeError.name = 'UnauthorizedError';
165
+ unAuthorizeError.status = 401;
166
+ throw unAuthorizeError;
163
167
  }
164
168
  }
165
169
  next();
@@ -223,7 +227,10 @@ let PassportService = class PassportService {
223
227
  return;
224
228
  }
225
229
  else {
226
- ctx.status = 401;
230
+ const unAuthorizeError = new Error('UnAuthorized!');
231
+ unAuthorizeError.name = 'UnauthorizedError';
232
+ unAuthorizeError.status = 401;
233
+ throw unAuthorizeError;
227
234
  }
228
235
  }
229
236
  await next();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@midwayjs/passport",
3
3
  "description": "midway passport component",
4
- "version": "2.14.2",
4
+ "version": "2.14.4",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
7
7
  "files": [
@@ -37,5 +37,5 @@
37
37
  "peerDependencies": {
38
38
  "passport": "^0.5.0"
39
39
  },
40
- "gitHead": "68b7fd9182619e8428f353f24a52254abce6e5bf"
40
+ "gitHead": "7d7f01072b2aabb1ee66561fc0406a327de90d8b"
41
41
  }