@midwayjs/passport 3.14.7 → 3.14.10
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/passport/passport.service.js +1 -1
- package/index.d.ts +4 -4
- package/package.json +5 -5
|
@@ -386,7 +386,7 @@ function PassportMiddleware(strategy) {
|
|
|
386
386
|
};
|
|
387
387
|
req.isAuthenticated = () => {
|
|
388
388
|
const property = this.passport.getUserProperty();
|
|
389
|
-
return !!
|
|
389
|
+
return !!req[property];
|
|
390
390
|
};
|
|
391
391
|
req.isUnauthenticated = () => {
|
|
392
392
|
return !req.isAuthenticated();
|
package/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ declare module '@midwayjs/koa/dist/interface' {
|
|
|
16
16
|
isAuthenticated(): boolean;
|
|
17
17
|
isUnauthenticated(): boolean;
|
|
18
18
|
login(): Promise<void>;
|
|
19
|
-
logout(): void
|
|
19
|
+
logout(): Promise<void>;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -28,7 +28,7 @@ declare module '@midwayjs/web/dist/interface' {
|
|
|
28
28
|
isAuthenticated(): boolean;
|
|
29
29
|
isUnauthenticated(): boolean;
|
|
30
30
|
login(): Promise<void>;
|
|
31
|
-
logout(): void
|
|
31
|
+
logout(): Promise<void>;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -40,7 +40,7 @@ declare module '@midwayjs/faas/dist/interface' {
|
|
|
40
40
|
isAuthenticated(): boolean;
|
|
41
41
|
isUnauthenticated(): boolean;
|
|
42
42
|
login(): Promise<void>;
|
|
43
|
-
logout(): void
|
|
43
|
+
logout(): Promise<void>;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -50,7 +50,7 @@ declare module '@midwayjs/express/dist/interface' {
|
|
|
50
50
|
// These declarations are merged into express's Request type
|
|
51
51
|
login(user: any, done: (err: any) => void): void;
|
|
52
52
|
login(user: any, options: any, done: (err: any) => void): void;
|
|
53
|
-
logout(): void
|
|
53
|
+
logout(): Promise<void>;
|
|
54
54
|
isAuthenticated(): boolean;
|
|
55
55
|
isUnauthenticated(): boolean;
|
|
56
56
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/passport",
|
|
3
3
|
"description": "midway passport component",
|
|
4
|
-
"version": "3.14.
|
|
4
|
+
"version": "3.14.10",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@midwayjs/core": "^3.14.4",
|
|
26
|
-
"@midwayjs/express": "^3.14.
|
|
27
|
-
"@midwayjs/jwt": "^3.14.
|
|
26
|
+
"@midwayjs/express": "^3.14.10",
|
|
27
|
+
"@midwayjs/jwt": "^3.14.10",
|
|
28
28
|
"@midwayjs/koa": "^3.14.7",
|
|
29
29
|
"@midwayjs/mock": "^3.14.7",
|
|
30
30
|
"@midwayjs/web": "^3.14.7",
|
|
31
31
|
"@types/passport-local": "1.0.38",
|
|
32
|
-
"express-session": "1.
|
|
32
|
+
"express-session": "1.18.0",
|
|
33
33
|
"passport-jwt": "4.0.1",
|
|
34
34
|
"passport-local": "1.0.0",
|
|
35
35
|
"passport-openidconnect": "0.1.1"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "18045aafe8570139c6d0a38b959f8db12624ae2e"
|
|
38
38
|
}
|