@feathersjs/authentication-local 5.0.0-pre.10 → 5.0.0-pre.16
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 +51 -0
- package/lib/hooks/hash-password.d.ts +1 -1
- package/lib/hooks/hash-password.js.map +1 -1
- package/lib/hooks/protect.d.ts +1 -1
- package/lib/hooks/protect.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/hooks/hash-password.ts +1 -1
- package/src/hooks/protect.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,57 @@
|
|
|
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
|
+
# [5.0.0-pre.16](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.15...v5.0.0-pre.16) (2022-01-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @feathersjs/authentication-local
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [5.0.0-pre.15](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.14...v5.0.0-pre.15) (2021-11-27)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **typescript:** Overall typing improvements ([#2478](https://github.com/feathersjs/feathers/issues/2478)) ([b8eb804](https://github.com/feathersjs/feathers/commit/b8eb804158556d9651a8607e3c3fda15e0bfd110))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [5.0.0-pre.14](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.13...v5.0.0-pre.14) (2021-10-13)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @feathersjs/authentication-local
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# [5.0.0-pre.13](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.12...v5.0.0-pre.13) (2021-10-13)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @feathersjs/authentication-local
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# [5.0.0-pre.12](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.11...v5.0.0-pre.12) (2021-10-12)
|
|
42
|
+
|
|
43
|
+
**Note:** Version bump only for package @feathersjs/authentication-local
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# [5.0.0-pre.11](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.10...v5.0.0-pre.11) (2021-10-06)
|
|
50
|
+
|
|
51
|
+
**Note:** Version bump only for package @feathersjs/authentication-local
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
6
57
|
# [5.0.0-pre.10](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.9...v5.0.0-pre.10) (2021-09-19)
|
|
7
58
|
|
|
8
59
|
|
|
@@ -3,4 +3,4 @@ export interface HashPasswordOptions {
|
|
|
3
3
|
authentication?: string;
|
|
4
4
|
strategy?: string;
|
|
5
5
|
}
|
|
6
|
-
export default function hashPassword(field: string, options?: HashPasswordOptions): (context: HookContext
|
|
6
|
+
export default function hashPassword(field: string, options?: HashPasswordOptions): (context: HookContext, next?: NextFunction) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash-password.js","sourceRoot":"","sources":["../../src/hooks/hash-password.ts"],"names":[],"mappings":";;;;;AAAA,qDAA6B;AAC7B,qDAA6B;AAC7B,iEAAyC;AACzC,+CAAgD;AAChD,iDAAkD;AAIlD,MAAM,KAAK,GAAG,IAAA,qBAAW,EAAC,sDAAsD,CAAC,CAAC;AAOlF,SAAwB,YAAY,C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,MAAM,QAAQ,GAAG,IAAA,aAAG,EAAC,IAAI,EAAE,KAAK,CAAC,CAAC;gBAElC,IAAI,QAAQ,KAAK,SAAS,EAAE;oBAC1B,KAAK,CAAC,aAAa,KAAK,qCAAqC,CAAC,CAAC;oBAC/D,OAAO,IAAI,CAAC;iBACb;gBAED,MAAM,cAAc,GAAW,MAAM,aAAa,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;gBAElF,OAAO,IAAA,aAAG,EAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;YACrD,CAAC,CAAA;YAED,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;gBACnF,MAAM,iBAAiB,CAAC,IAAI,CAAC,CAAC;SACjC;QAED,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE;YAC9B,MAAM,IAAI,EAAE,CAAC;SACd;IACH,CAAC,CAAC;AACJ,CAAC;AA3CD,+BA2CC"}
|
package/lib/hooks/protect.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { HookContext, NextFunction } from '@feathersjs/feathers';
|
|
2
|
-
declare const _default: (...fields: string[]) => (context: HookContext
|
|
2
|
+
declare const _default: (...fields: string[]) => (context: HookContext, next?: NextFunction) => Promise<void>;
|
|
3
3
|
export default _default;
|
package/lib/hooks/protect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protect.js","sourceRoot":"","sources":["../../src/hooks/protect.ts"],"names":[],"mappings":";;;;;AAAA,uDAA+B;AAG/B,kBAAe,CAAC,GAAG,MAAgB,EAAE,EAAE,CAAC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"protect.js","sourceRoot":"","sources":["../../src/hooks/protect.ts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,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;SACnC;KACF;AACH,CAAC,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import hashPassword from './hooks/hash-password';
|
|
2
2
|
export declare const hooks: {
|
|
3
3
|
hashPassword: typeof hashPassword;
|
|
4
|
-
protect: (...fields: string[]) => (context: import("@feathersjs/feathers/lib").HookContext<any, any>, next?: import("@feathersjs/hooks/lib").NextFunction) => Promise<void>;
|
|
4
|
+
protect: (...fields: string[]) => (context: import("@feathersjs/feathers/lib").HookContext<import("@feathersjs/feathers/lib").Application<any, any>, any>, next?: import("@feathersjs/hooks/lib").NextFunction) => Promise<void>;
|
|
5
5
|
};
|
|
6
6
|
export { LocalStrategy } from './strategy';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feathersjs/authentication-local",
|
|
3
3
|
"description": "Local authentication strategy for @feathers/authentication",
|
|
4
|
-
"version": "5.0.0-pre.
|
|
4
|
+
"version": "5.0.0-pre.16",
|
|
5
5
|
"homepage": "https://feathersjs.com",
|
|
6
6
|
"main": "lib/",
|
|
7
7
|
"types": "lib/",
|
|
@@ -52,23 +52,23 @@
|
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@feathersjs/authentication": "^5.0.0-pre.
|
|
56
|
-
"@feathersjs/commons": "^5.0.0-pre.
|
|
57
|
-
"@feathersjs/errors": "^5.0.0-pre.
|
|
58
|
-
"@feathersjs/feathers": "^5.0.0-pre.
|
|
55
|
+
"@feathersjs/authentication": "^5.0.0-pre.16",
|
|
56
|
+
"@feathersjs/commons": "^5.0.0-pre.16",
|
|
57
|
+
"@feathersjs/errors": "^5.0.0-pre.16",
|
|
58
|
+
"@feathersjs/feathers": "^5.0.0-pre.16",
|
|
59
59
|
"bcryptjs": "^2.4.3",
|
|
60
60
|
"lodash": "^4.17.21"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@feathersjs/memory": "^5.0.0-pre.
|
|
63
|
+
"@feathersjs/memory": "^5.0.0-pre.16",
|
|
64
64
|
"@types/bcryptjs": "^2.4.2",
|
|
65
|
-
"@types/lodash": "^4.14.
|
|
65
|
+
"@types/lodash": "^4.14.178",
|
|
66
66
|
"@types/mocha": "^9.0.0",
|
|
67
|
-
"@types/node": "^
|
|
68
|
-
"mocha": "^9.1.
|
|
67
|
+
"@types/node": "^17.0.5",
|
|
68
|
+
"mocha": "^9.1.3",
|
|
69
69
|
"shx": "^0.3.3",
|
|
70
|
-
"ts-node": "^10.
|
|
71
|
-
"typescript": "^4.4
|
|
70
|
+
"ts-node": "^10.4.0",
|
|
71
|
+
"typescript": "^4.5.4"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "f0cd227a82d159b528193bd33747c97684a48773"
|
|
74
74
|
}
|
|
@@ -18,7 +18,7 @@ export default function hashPassword (field: string, options: HashPasswordOption
|
|
|
18
18
|
throw new Error('The hashPassword hook requires a field name option');
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
return async (context: HookContext
|
|
21
|
+
return async (context: HookContext, next?: NextFunction) => {
|
|
22
22
|
const { app, data, params } = context;
|
|
23
23
|
|
|
24
24
|
if (data !== undefined) {
|
package/src/hooks/protect.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import omit from 'lodash/omit';
|
|
2
2
|
import { HookContext, NextFunction } from '@feathersjs/feathers';
|
|
3
3
|
|
|
4
|
-
export default (...fields: string[]) => async (context: HookContext
|
|
4
|
+
export default (...fields: string[]) => async (context: HookContext, next?: NextFunction) => {
|
|
5
5
|
const o = (current: any) => {
|
|
6
6
|
if (typeof current === 'object' && !Array.isArray(current)) {
|
|
7
7
|
const data = typeof current.toJSON === 'function'
|