@midwayjs/passport 3.0.0-beta.13 → 3.0.0-beta.17
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/service/passport.js +3 -2
- package/package.json +16 -16
- package/CHANGELOG.md +0 -65
package/dist/service/passport.js
CHANGED
|
@@ -13,6 +13,7 @@ exports.PassportMiddleware = exports.PassportStrategy = void 0;
|
|
|
13
13
|
const decorator_1 = require("@midwayjs/decorator");
|
|
14
14
|
const util_1 = require("../util");
|
|
15
15
|
const interface_1 = require("../interface");
|
|
16
|
+
const core_1 = require("@midwayjs/core");
|
|
16
17
|
function PassportStrategy(Strategy, name) {
|
|
17
18
|
class InnerStrategyAbstractClass extends interface_1.AbstractStrategy {
|
|
18
19
|
async init() {
|
|
@@ -132,7 +133,7 @@ function PassportMiddleware(strategy) {
|
|
|
132
133
|
return;
|
|
133
134
|
}
|
|
134
135
|
else {
|
|
135
|
-
|
|
136
|
+
throw new core_1.httpError.UnauthorizedError();
|
|
136
137
|
}
|
|
137
138
|
}
|
|
138
139
|
next();
|
|
@@ -195,7 +196,7 @@ function PassportMiddleware(strategy) {
|
|
|
195
196
|
return;
|
|
196
197
|
}
|
|
197
198
|
else {
|
|
198
|
-
|
|
199
|
+
throw new core_1.httpError.UnauthorizedError();
|
|
199
200
|
}
|
|
200
201
|
}
|
|
201
202
|
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": "3.0.0-beta.
|
|
4
|
+
"version": "3.0.0-beta.17",
|
|
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 --coverage --forceExit"
|
|
15
|
+
"cov": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand --coverage --forceExit"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
18
|
"midway",
|
|
@@ -22,22 +22,22 @@
|
|
|
22
22
|
"author": "Nawbc",
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@midwayjs/core": "^3.0.0-beta.
|
|
26
|
-
"@midwayjs/decorator": "^3.0.0-beta.
|
|
27
|
-
"@midwayjs/express": "^3.0.0-beta.
|
|
28
|
-
"@midwayjs/jwt": "^3.0.0-beta.
|
|
29
|
-
"@midwayjs/koa": "^3.0.0-beta.
|
|
30
|
-
"@midwayjs/mock": "^3.0.0-beta.
|
|
31
|
-
"@midwayjs/web": "^3.0.0-beta.
|
|
32
|
-
"@types/passport": "
|
|
33
|
-
"@types/passport-local": "
|
|
34
|
-
"express-session": "
|
|
35
|
-
"passport": "
|
|
36
|
-
"passport-jwt": "
|
|
37
|
-
"passport-local": "
|
|
25
|
+
"@midwayjs/core": "^3.0.0-beta.17",
|
|
26
|
+
"@midwayjs/decorator": "^3.0.0-beta.17",
|
|
27
|
+
"@midwayjs/express": "^3.0.0-beta.17",
|
|
28
|
+
"@midwayjs/jwt": "^3.0.0-beta.17",
|
|
29
|
+
"@midwayjs/koa": "^3.0.0-beta.17",
|
|
30
|
+
"@midwayjs/mock": "^3.0.0-beta.17",
|
|
31
|
+
"@midwayjs/web": "^3.0.0-beta.17",
|
|
32
|
+
"@types/passport": "1.0.7",
|
|
33
|
+
"@types/passport-local": "1.0.34",
|
|
34
|
+
"express-session": "1.17.2",
|
|
35
|
+
"passport": "0.5.2",
|
|
36
|
+
"passport-jwt": "4.0.0",
|
|
37
|
+
"passport-local": "1.0.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"passport": "^0.5.0"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "17a8b5bd3d0b0b21f24dd2f165b5df9097fc3ec4"
|
|
43
43
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
# [3.0.0-beta.13](https://github.com/midwayjs/midway/compare/v3.0.0-beta.12...v3.0.0-beta.13) (2021-12-30)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @midwayjs/passport
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# [3.0.0-beta.12](https://github.com/midwayjs/midway/compare/v3.0.0-beta.11...v3.0.0-beta.12) (2021-12-28)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
### Features
|
|
18
|
-
|
|
19
|
-
* support throw err status ([#1440](https://github.com/midwayjs/midway/issues/1440)) ([7b98110](https://github.com/midwayjs/midway/commit/7b98110d65c5287a8fcb3eb5356dea2d7a32cee9))
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
# [3.0.0-beta.11](https://github.com/midwayjs/midway/compare/v3.0.0-beta.10...v3.0.0-beta.11) (2021-12-21)
|
|
26
|
-
|
|
27
|
-
**Note:** Version bump only for package @midwayjs/passport
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
# [3.0.0-beta.10](https://github.com/midwayjs/midway/compare/v3.0.0-beta.9...v3.0.0-beta.10) (2021-12-20)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
### Features
|
|
37
|
-
|
|
38
|
-
* default add session & bodyparser support for koa/express/faas ([#1420](https://github.com/midwayjs/midway/issues/1420)) ([cdaff31](https://github.com/midwayjs/midway/commit/cdaff317c3e862a95494a167995a28280af639bf))
|
|
39
|
-
* implement i18n for validate ([#1426](https://github.com/midwayjs/midway/issues/1426)) ([4c7ed2f](https://github.com/midwayjs/midway/commit/4c7ed2ff2e7ccf10f88f62abad230f92f5e76b97))
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
# [3.0.0-beta.9](https://github.com/midwayjs/midway/compare/v3.0.0-beta.8...v3.0.0-beta.9) (2021-12-09)
|
|
46
|
-
|
|
47
|
-
**Note:** Version bump only for package @midwayjs/passport
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
# [3.0.0-beta.8](https://github.com/midwayjs/midway/compare/v3.0.0-beta.7...v3.0.0-beta.8) (2021-12-08)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### Bug Fixes
|
|
57
|
-
|
|
58
|
-
* express routing middleware takes effect at the controller level ([#1364](https://github.com/midwayjs/midway/issues/1364)) ([b9272e0](https://github.com/midwayjs/midway/commit/b9272e0971003443304b0c53815be31a0061b4bd))
|
|
59
|
-
* passport missing proxy file ([#1405](https://github.com/midwayjs/midway/issues/1405)) ([5c9bdae](https://github.com/midwayjs/midway/commit/5c9bdae8323b41ead72c3d3f867aa11150bb3e78))
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
### Features
|
|
63
|
-
|
|
64
|
-
* passport add presetProperty ([#1358](https://github.com/midwayjs/midway/issues/1358)) ([4db8eda](https://github.com/midwayjs/midway/commit/4db8eda592c0486898edabcacbc9a69eb2d87004))
|
|
65
|
-
* support passport and jwt ([#1343](https://github.com/midwayjs/midway/issues/1343)) ([f26af4f](https://github.com/midwayjs/midway/commit/f26af4f3e16507d6f3ffe0467f8f5be69e6306d7))
|