@midwayjs/passport 3.14.7 → 3.14.11

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.
@@ -386,7 +386,7 @@ function PassportMiddleware(strategy) {
386
386
  };
387
387
  req.isAuthenticated = () => {
388
388
  const property = this.passport.getUserProperty();
389
- return !!this[property];
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.7",
4
+ "version": "3.14.11",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
7
7
  "files": [
@@ -22,17 +22,17 @@
22
22
  "author": "Nawbc",
23
23
  "license": "MIT",
24
24
  "devDependencies": {
25
- "@midwayjs/core": "^3.14.4",
26
- "@midwayjs/express": "^3.14.7",
27
- "@midwayjs/jwt": "^3.14.7",
28
- "@midwayjs/koa": "^3.14.7",
29
- "@midwayjs/mock": "^3.14.7",
30
- "@midwayjs/web": "^3.14.7",
25
+ "@midwayjs/core": "^3.14.11",
26
+ "@midwayjs/express": "^3.14.11",
27
+ "@midwayjs/jwt": "^3.14.11",
28
+ "@midwayjs/koa": "^3.14.11",
29
+ "@midwayjs/mock": "^3.14.11",
30
+ "@midwayjs/web": "^3.14.11",
31
31
  "@types/passport-local": "1.0.38",
32
- "express-session": "1.17.3",
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": "148356ccd4b97404dde43d4a06edd51da039828a"
37
+ "gitHead": "a24b455e0b55cda9563236b35f9b49b600920642"
38
38
  }