@nest-boot/auth 8.0.7-beta.0 → 8.0.7-beta.2
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/README.md +5 -0
- package/dist/auth-module-options.interface.d.ts +1 -1
- package/dist/infrastructure/api-key-lifecycle.d.ts +1 -1
- package/dist/infrastructure/api-key-lifecycle.js +2 -2
- package/dist/infrastructure/api-key-lifecycle.js.map +1 -1
- package/dist/infrastructure/auth-ability.factory.js +8 -0
- package/dist/infrastructure/auth-ability.factory.js.map +1 -1
- package/dist/inputs/create-user-api-key.input.d.ts +1 -1
- package/dist/inputs/create-user-api-key.input.js +2 -2
- package/dist/inputs/create-user-api-key.input.js.map +1 -1
- package/dist/inputs/create-workspace-api-key.input.d.ts +1 -1
- package/dist/inputs/create-workspace-api-key.input.js +2 -2
- package/dist/inputs/create-workspace-api-key.input.js.map +1 -1
- package/dist/interfaces/auth-module-api-key-options.interface.d.ts +1 -1
- package/dist/interfaces/auth-module-api-key-scope-options.interface.d.ts +3 -1
- package/dist/interfaces/create-api-key-options.interface.d.ts +1 -1
- package/dist/services/member.service.js +14 -6
- package/dist/services/member.service.js.map +1 -1
- package/dist/services/user-api-key.service.js +3 -1
- package/dist/services/user-api-key.service.js.map +1 -1
- package/dist/services/workspace-api-key.service.js +3 -1
- package/dist/services/workspace-api-key.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/api-key-credential.util.js +2 -2
- package/dist/utils/api-key-credential.util.js.map +1 -1
- package/package.json +11 -11
|
@@ -8,8 +8,8 @@ export function hashApiKey(apiKey) {
|
|
|
8
8
|
export function generateApiKey(prefix) {
|
|
9
9
|
if (prefix.length > 32 ||
|
|
10
10
|
!/^[a-z]/u.test(prefix) ||
|
|
11
|
-
/[^a-z0-
|
|
12
|
-
throw new BadRequestException("API key prefix must contain 1–32 lowercase letters or
|
|
11
|
+
/[^a-z0-9_-]/u.test(prefix)) {
|
|
12
|
+
throw new BadRequestException("API key prefix must contain 1–32 lowercase letters, digits, underscores, or hyphens and start with a lowercase letter");
|
|
13
13
|
}
|
|
14
14
|
return `${prefix}${randomBytes(48).toString("base64url")}`;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-key-credential.util.js","sourceRoot":"","sources":["../../src/utils/api-key-credential.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,iEAAiE;AACjE,MAAM,UAAU,UAAU,CAAC,MAAc;IACvC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AACjE,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,cAAc,CAAC,MAAc;IAC3C,IACE,MAAM,CAAC,MAAM,GAAG,EAAE;QAClB,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;QACvB,
|
|
1
|
+
{"version":3,"file":"api-key-credential.util.js","sourceRoot":"","sources":["../../src/utils/api-key-credential.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,iEAAiE;AACjE,MAAM,UAAU,UAAU,CAAC,MAAc;IACvC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AACjE,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,cAAc,CAAC,MAAc;IAC3C,IACE,MAAM,CAAC,MAAM,GAAG,EAAE;QAClB,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;QACvB,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,EAC3B,CAAC;QACD,MAAM,IAAI,mBAAmB,CAC3B,uHAAuH,CACxH,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,MAAM,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;AAC7D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nest-boot/auth",
|
|
3
|
-
"version": "8.0.7-beta.
|
|
3
|
+
"version": "8.0.7-beta.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/nest-boot/nest-boot.git",
|
|
@@ -53,14 +53,14 @@
|
|
|
53
53
|
"zod": "^4.3.6",
|
|
54
54
|
"@nest-boot/eslint-config": "^8.0.2-beta.0",
|
|
55
55
|
"@nest-boot/graphql-connection": "^8.0.2-beta.1",
|
|
56
|
-
"@nest-boot/eslint-plugin": "^8.0.1-beta.1",
|
|
57
|
-
"@nest-boot/hash": "^8.0.2-beta.0",
|
|
58
56
|
"@nest-boot/mailer": "^8.0.2-beta.0",
|
|
59
|
-
"@nest-boot/
|
|
57
|
+
"@nest-boot/hash": "^8.0.2-beta.0",
|
|
58
|
+
"@nest-boot/eslint-plugin": "^8.0.1-beta.1",
|
|
60
59
|
"@nest-boot/middleware": "^8.0.2-beta.0",
|
|
61
|
-
"@nest-boot/
|
|
60
|
+
"@nest-boot/tsconfig": "^8.0.0-beta.4",
|
|
61
|
+
"@nest-boot/request-context": "^8.0.2-beta.0",
|
|
62
62
|
"@nest-boot/validator": "^8.0.5-beta.0",
|
|
63
|
-
"@nest-boot/
|
|
63
|
+
"@nest-boot/graphql": "^8.0.2-beta.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@casl/ability": "^7.0.0",
|
|
@@ -76,13 +76,13 @@
|
|
|
76
76
|
"@nestjs/graphql": "^14.0.0",
|
|
77
77
|
"graphql": "^16.0.0",
|
|
78
78
|
"zod": "^4.0.0",
|
|
79
|
-
"@nest-boot/
|
|
79
|
+
"@nest-boot/graphql-connection": "^8.0.2-beta.1",
|
|
80
|
+
"@nest-boot/middleware": "^8.0.2-beta.0",
|
|
80
81
|
"@nest-boot/hash": "^8.0.2-beta.0",
|
|
81
|
-
"@nest-boot/
|
|
82
|
+
"@nest-boot/mailer": "^8.0.2-beta.0",
|
|
82
83
|
"@nest-boot/validator": "^8.0.5-beta.0",
|
|
83
|
-
"@nest-boot/
|
|
84
|
-
"@nest-boot/
|
|
85
|
-
"@nest-boot/graphql-connection": "^8.0.2-beta.1"
|
|
84
|
+
"@nest-boot/graphql": "^8.0.2-beta.0",
|
|
85
|
+
"@nest-boot/request-context": "^8.0.2-beta.0"
|
|
86
86
|
},
|
|
87
87
|
"publishConfig": {
|
|
88
88
|
"access": "public"
|