@drax/identity-back 0.47.0 → 0.50.0
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/middleware/apiKeyMiddleware.js +2 -2
- package/dist/middleware/rbacMiddleware.js +1 -1
- package/package.json +9 -9
- package/src/middleware/apiKeyMiddleware.ts +3 -2
- package/src/middleware/rbacMiddleware.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/types/factory/UserApiKeyServiceFactory.d.ts +1 -1
- package/types/middleware/apiKeyMiddleware.d.ts.map +1 -1
- package/types/models/RoleModel.d.ts +2 -2
- package/types/models/TenantModel.d.ts +2 -2
- package/types/models/UserApiKeyModel.d.ts +2 -2
- package/types/models/UserGroupModel.d.ts +2 -2
- package/types/models/UserLoginFailModel.d.ts +2 -2
- package/types/models/UserModel.d.ts +2 -2
- package/types/models/UserSessionModel.d.ts +2 -2
- package/types/schemas/PasswordSchema.d.ts +2 -2
- package/types/schemas/RegisterSchema.d.ts +2 -2
- package/types/schemas/RoleSchema.d.ts +17 -21
- package/types/schemas/RoleSchema.d.ts.map +1 -1
- package/types/schemas/TenantSchema.d.ts +7 -7
- package/types/schemas/TokenPayloadSchema.d.ts +2 -2
- package/types/schemas/UserApiKeySchema.d.ts +5 -5
- package/types/schemas/UserLoginFailSchema.d.ts +4 -4
- package/types/schemas/UserSchema.d.ts +59 -62
- package/types/schemas/UserSchema.d.ts.map +1 -1
- package/types/schemas/UserSessionSchema.d.ts +18 -19
- package/types/schemas/UserSessionSchema.d.ts.map +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DraxCache, DraxConfig } from "@drax/common-back";
|
|
2
2
|
import UserApiKeyServiceFactory from "../factory/UserApiKeyServiceFactory.js";
|
|
3
3
|
import IdentityConfig from "../config/IdentityConfig.js";
|
|
4
|
-
const verifyIp = DraxConfig.getOrLoad(IdentityConfig.VerifyIP
|
|
5
|
-
const cacheTTL = DraxConfig.getOrLoad(IdentityConfig.ApiKeyCacheTTL
|
|
4
|
+
const verifyIp = DraxConfig.getOrLoad(IdentityConfig.VerifyIP, 'boolean', true);
|
|
5
|
+
const cacheTTL = DraxConfig.getOrLoad(IdentityConfig.ApiKeyCacheTTL, 'number', 10000);
|
|
6
6
|
const draxCache = new DraxCache(cacheTTL);
|
|
7
7
|
async function userApiKeyLoader(k) {
|
|
8
8
|
const userApiKeyService = UserApiKeyServiceFactory();
|
|
@@ -2,7 +2,7 @@ import { DraxCache, DraxConfig } from "@drax/common-back";
|
|
|
2
2
|
import RoleServiceFactory from "../factory/RoleServiceFactory.js";
|
|
3
3
|
import Rbac from "../rbac/Rbac.js";
|
|
4
4
|
import IdentityConfig from "../config/IdentityConfig.js";
|
|
5
|
-
const cacheTTL = DraxConfig.getOrLoad(IdentityConfig.RbacCacheTTL
|
|
5
|
+
const cacheTTL = DraxConfig.getOrLoad(IdentityConfig.RbacCacheTTL, 'number', 10000);
|
|
6
6
|
const draxCache = new DraxCache(cacheTTL);
|
|
7
7
|
async function roleLoader(k) {
|
|
8
8
|
const roleService = RoleServiceFactory();
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.50.0",
|
|
7
7
|
"description": "Identity module for user management, authentication and authorization.",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "types/index.d.ts",
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
"author": "Cristian Incarnato & Drax Team",
|
|
29
29
|
"license": "ISC",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@drax/common-back": "^0.
|
|
32
|
-
"@drax/crud-back": "^0.
|
|
33
|
-
"@drax/crud-share": "^0.
|
|
34
|
-
"@drax/email-back": "^0.
|
|
35
|
-
"@drax/identity-share": "^0.
|
|
31
|
+
"@drax/common-back": "^0.50.0",
|
|
32
|
+
"@drax/crud-back": "^0.50.0",
|
|
33
|
+
"@drax/crud-share": "^0.50.0",
|
|
34
|
+
"@drax/email-back": "^0.50.0",
|
|
35
|
+
"@drax/identity-share": "^0.50.0",
|
|
36
36
|
"bcryptjs": "^2.4.3",
|
|
37
37
|
"graphql": "^16.8.2",
|
|
38
38
|
"jsonwebtoken": "^9.0.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"better-sqlite3": "^11.0.0",
|
|
42
|
-
"fastify": "^5.
|
|
43
|
-
"mongoose": "^8.
|
|
42
|
+
"fastify": "^5.7.1",
|
|
43
|
+
"mongoose": "^8.21.0",
|
|
44
44
|
"mongoose-paginate-v2": "^1.8.3",
|
|
45
45
|
"mongoose-unique-validator": "^5.0.1",
|
|
46
46
|
"zod": "^3.23.8"
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"debug": "0"
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "92cb8fa7600090791ace14afa4518f3f4c7113e1"
|
|
67
67
|
}
|
|
@@ -3,8 +3,9 @@ import {DraxCache, DraxConfig} from "@drax/common-back";
|
|
|
3
3
|
import UserApiKeyServiceFactory from "../factory/UserApiKeyServiceFactory.js";
|
|
4
4
|
import IdentityConfig from "../config/IdentityConfig.js";
|
|
5
5
|
|
|
6
|
-
const verifyIp = DraxConfig.getOrLoad(IdentityConfig.VerifyIP
|
|
7
|
-
const cacheTTL = DraxConfig.getOrLoad(IdentityConfig.ApiKeyCacheTTL
|
|
6
|
+
const verifyIp = DraxConfig.getOrLoad(IdentityConfig.VerifyIP, 'boolean', true);
|
|
7
|
+
const cacheTTL = DraxConfig.getOrLoad(IdentityConfig.ApiKeyCacheTTL, 'number',10000)
|
|
8
|
+
|
|
8
9
|
const draxCache = new DraxCache<IUserApiKey>(cacheTTL);
|
|
9
10
|
|
|
10
11
|
|
|
@@ -4,7 +4,7 @@ import RoleServiceFactory from "../factory/RoleServiceFactory.js";
|
|
|
4
4
|
import Rbac from "../rbac/Rbac.js";
|
|
5
5
|
import IdentityConfig from "../config/IdentityConfig.js";
|
|
6
6
|
|
|
7
|
-
const cacheTTL = DraxConfig.getOrLoad(IdentityConfig.RbacCacheTTL
|
|
7
|
+
const cacheTTL = DraxConfig.getOrLoad(IdentityConfig.RbacCacheTTL, 'number',10000) ;
|
|
8
8
|
const draxCache = new DraxCache<IRole>(cacheTTL);
|
|
9
9
|
|
|
10
10
|
|