@travetto/auth 5.0.9 → 5.0.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.
- package/__index__.ts +2 -1
- package/package.json +2 -2
- package/src/types/error.ts +7 -0
- package/src/util.ts +1 -1
package/__index__.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/auth",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.11",
|
|
4
4
|
"description": "Authentication scaffolding for the Travetto framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"authentication",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"directory": "module/auth"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@travetto/runtime": "^5.0.
|
|
26
|
+
"@travetto/runtime": "^5.0.11"
|
|
27
27
|
},
|
|
28
28
|
"travetto": {
|
|
29
29
|
"displayName": "Authentication"
|
package/src/util.ts
CHANGED
|
@@ -33,7 +33,7 @@ export class AuthUtil {
|
|
|
33
33
|
*/
|
|
34
34
|
static async generatePassword(password: string, salt: number | string = 32): Promise<{ salt: string, hash: string }> {
|
|
35
35
|
if (!password) {
|
|
36
|
-
throw new AppError('Password is required', 'data');
|
|
36
|
+
throw new AppError('Password is required', { category: 'data' });
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
salt = typeof salt === 'number' ? Util.uuid(salt) : salt;
|