@twin.org/api-auth-entity-storage-service 0.0.3-next.4 → 0.0.3-next.40
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 +2 -2
- package/dist/es/entities/authenticationAuditEntry.js +101 -0
- package/dist/es/entities/authenticationAuditEntry.js.map +1 -0
- package/dist/es/entities/authenticationRateEntry.js +37 -0
- package/dist/es/entities/authenticationRateEntry.js.map +1 -0
- package/dist/es/entities/authenticationUser.js +17 -1
- package/dist/es/entities/authenticationUser.js.map +1 -1
- package/dist/es/index.js +11 -1
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IAuthHeaderProcessorConstructorOptions.js.map +1 -1
- package/dist/es/models/IEntityStorageAuthenticationAdminServiceConstructorOptions.js.map +1 -1
- package/dist/es/models/IEntityStorageAuthenticationAuditServiceConfig.js +4 -0
- package/dist/es/models/IEntityStorageAuthenticationAuditServiceConfig.js.map +1 -0
- package/dist/es/models/IEntityStorageAuthenticationAuditServiceConstructorOptions.js +2 -0
- package/dist/es/models/IEntityStorageAuthenticationAuditServiceConstructorOptions.js.map +1 -0
- package/dist/es/models/IEntityStorageAuthenticationRateServiceConfig.js +2 -0
- package/dist/es/models/IEntityStorageAuthenticationRateServiceConfig.js.map +1 -0
- package/dist/es/models/IEntityStorageAuthenticationRateServiceConstructorOptions.js +2 -0
- package/dist/es/models/IEntityStorageAuthenticationRateServiceConstructorOptions.js.map +1 -0
- package/dist/es/models/IEntityStorageAuthenticationServiceConfig.js +0 -2
- package/dist/es/models/IEntityStorageAuthenticationServiceConfig.js.map +1 -1
- package/dist/es/models/IEntityStorageAuthenticationServiceConstructorOptions.js.map +1 -1
- package/dist/es/processors/authHeaderProcessor.js +62 -10
- package/dist/es/processors/authHeaderProcessor.js.map +1 -1
- package/dist/es/restEntryPoints.js +14 -0
- package/dist/es/restEntryPoints.js.map +1 -1
- package/dist/es/routes/entityStorageAuthenticationAdminRoutes.js +362 -0
- package/dist/es/routes/entityStorageAuthenticationAdminRoutes.js.map +1 -0
- package/dist/es/routes/entityStorageAuthenticationAuditRoutes.js +174 -0
- package/dist/es/routes/entityStorageAuthenticationAuditRoutes.js.map +1 -0
- package/dist/es/routes/entityStorageAuthenticationRoutes.js +20 -21
- package/dist/es/routes/entityStorageAuthenticationRoutes.js.map +1 -1
- package/dist/es/schema.js +4 -0
- package/dist/es/schema.js.map +1 -1
- package/dist/es/services/entityStorageAuthenticationAdminService.js +161 -55
- package/dist/es/services/entityStorageAuthenticationAdminService.js.map +1 -1
- package/dist/es/services/entityStorageAuthenticationAuditService.js +178 -0
- package/dist/es/services/entityStorageAuthenticationAuditService.js.map +1 -0
- package/dist/es/services/entityStorageAuthenticationRateService.js +202 -0
- package/dist/es/services/entityStorageAuthenticationRateService.js.map +1 -0
- package/dist/es/services/entityStorageAuthenticationService.js +200 -14
- package/dist/es/services/entityStorageAuthenticationService.js.map +1 -1
- package/dist/es/utils/passwordHelper.js +45 -16
- package/dist/es/utils/passwordHelper.js.map +1 -1
- package/dist/es/utils/tokenHelper.js +45 -21
- package/dist/es/utils/tokenHelper.js.map +1 -1
- package/dist/types/entities/authenticationAuditEntry.d.ts +49 -0
- package/dist/types/entities/authenticationRateEntry.d.ts +17 -0
- package/dist/types/entities/authenticationUser.d.ts +8 -0
- package/dist/types/index.d.ts +11 -1
- package/dist/types/models/IAuthHeaderProcessorConstructorOptions.d.ts +14 -0
- package/dist/types/models/IEntityStorageAuthenticationAdminServiceConstructorOptions.d.ts +5 -0
- package/dist/types/models/IEntityStorageAuthenticationAuditServiceConfig.d.ts +9 -0
- package/dist/types/models/IEntityStorageAuthenticationAuditServiceConstructorOptions.d.ts +15 -0
- package/dist/types/models/IEntityStorageAuthenticationRateServiceConfig.d.ts +10 -0
- package/dist/types/models/IEntityStorageAuthenticationRateServiceConstructorOptions.d.ts +20 -0
- package/dist/types/models/IEntityStorageAuthenticationServiceConfig.d.ts +22 -1
- package/dist/types/models/IEntityStorageAuthenticationServiceConstructorOptions.d.ts +17 -3
- package/dist/types/processors/authHeaderProcessor.d.ts +1 -1
- package/dist/types/routes/entityStorageAuthenticationAdminRoutes.d.ts +61 -0
- package/dist/types/routes/entityStorageAuthenticationAuditRoutes.d.ts +29 -0
- package/dist/types/services/entityStorageAuthenticationAdminService.d.ts +23 -6
- package/dist/types/services/entityStorageAuthenticationAuditService.d.ts +59 -0
- package/dist/types/services/entityStorageAuthenticationRateService.d.ts +60 -0
- package/dist/types/services/entityStorageAuthenticationService.d.ts +8 -3
- package/dist/types/utils/passwordHelper.d.ts +13 -5
- package/dist/types/utils/tokenHelper.d.ts +9 -2
- package/docs/changelog.md +658 -64
- package/docs/examples.md +178 -1
- package/docs/reference/classes/AuthHeaderProcessor.md +10 -10
- package/docs/reference/classes/AuthenticationAuditEntry.md +101 -0
- package/docs/reference/classes/AuthenticationRateEntry.md +37 -0
- package/docs/reference/classes/AuthenticationUser.md +21 -5
- package/docs/reference/classes/EntityStorageAuthenticationAdminService.md +78 -18
- package/docs/reference/classes/EntityStorageAuthenticationAuditService.md +157 -0
- package/docs/reference/classes/EntityStorageAuthenticationRateService.md +227 -0
- package/docs/reference/classes/EntityStorageAuthenticationService.md +36 -16
- package/docs/reference/classes/PasswordHelper.md +37 -12
- package/docs/reference/classes/TokenHelper.md +44 -8
- package/docs/reference/functions/authenticationAdminCreateUser.md +31 -0
- package/docs/reference/functions/authenticationAdminGetUser.md +31 -0
- package/docs/reference/functions/authenticationAdminGetUserByIdentity.md +31 -0
- package/docs/reference/functions/authenticationAdminRemoveUser.md +31 -0
- package/docs/reference/functions/authenticationAdminUpdateUser.md +31 -0
- package/docs/reference/functions/authenticationAdminUpdateUserPassword.md +31 -0
- package/docs/reference/functions/authenticationAuditCreate.md +31 -0
- package/docs/reference/functions/authenticationAuditQuery.md +31 -0
- package/docs/reference/functions/generateRestRoutesAuthenticationAdmin.md +25 -0
- package/docs/reference/functions/generateRestRoutesAuthenticationAudit.md +25 -0
- package/docs/reference/index.md +20 -0
- package/docs/reference/interfaces/IAuthHeaderProcessorConfig.md +4 -4
- package/docs/reference/interfaces/IAuthHeaderProcessorConstructorOptions.md +40 -4
- package/docs/reference/interfaces/IEntityStorageAuthenticationAdminServiceConfig.md +2 -2
- package/docs/reference/interfaces/IEntityStorageAuthenticationAdminServiceConstructorOptions.md +18 -4
- package/docs/reference/interfaces/IEntityStorageAuthenticationAuditServiceConfig.md +11 -0
- package/docs/reference/interfaces/IEntityStorageAuthenticationAuditServiceConstructorOptions.md +25 -0
- package/docs/reference/interfaces/IEntityStorageAuthenticationRateServiceConfig.md +17 -0
- package/docs/reference/interfaces/IEntityStorageAuthenticationRateServiceConstructorOptions.md +39 -0
- package/docs/reference/interfaces/IEntityStorageAuthenticationServiceConfig.md +61 -5
- package/docs/reference/interfaces/IEntityStorageAuthenticationServiceConstructorOptions.md +46 -10
- package/docs/reference/variables/tagsAuthenticationAdmin.md +5 -0
- package/docs/reference/variables/tagsAuthenticationAudit.md +5 -0
- package/locales/en.json +17 -3
- package/package.json +8 -7
|
@@ -4,9 +4,9 @@ Options for the EntityStorageAuthenticationService constructor.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### userEntityStorageType?
|
|
7
|
+
### userEntityStorageType? {#userentitystoragetype}
|
|
8
8
|
|
|
9
|
-
> `optional` **userEntityStorageType
|
|
9
|
+
> `optional` **userEntityStorageType?**: `string`
|
|
10
10
|
|
|
11
11
|
The entity storage for the users.
|
|
12
12
|
|
|
@@ -18,9 +18,9 @@ authentication-user
|
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
21
|
-
### vaultConnectorType?
|
|
21
|
+
### vaultConnectorType? {#vaultconnectortype}
|
|
22
22
|
|
|
23
|
-
> `optional` **vaultConnectorType
|
|
23
|
+
> `optional` **vaultConnectorType?**: `string`
|
|
24
24
|
|
|
25
25
|
The vault for the private keys.
|
|
26
26
|
|
|
@@ -32,22 +32,58 @@ vault
|
|
|
32
32
|
|
|
33
33
|
***
|
|
34
34
|
|
|
35
|
-
###
|
|
35
|
+
### urlTransformerComponentType? {#urltransformercomponenttype}
|
|
36
36
|
|
|
37
|
-
> `optional` **
|
|
37
|
+
> `optional` **urlTransformerComponentType?**: `string`
|
|
38
38
|
|
|
39
|
-
The
|
|
39
|
+
The URL transformer component for the tenants.
|
|
40
|
+
|
|
41
|
+
***
|
|
42
|
+
|
|
43
|
+
### authenticationAuditServiceType? {#authenticationauditservicetype}
|
|
44
|
+
|
|
45
|
+
> `optional` **authenticationAuditServiceType?**: `string`
|
|
46
|
+
|
|
47
|
+
The audit service.
|
|
48
|
+
|
|
49
|
+
#### Default
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
authentication-audit
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
***
|
|
56
|
+
|
|
57
|
+
### authenticationRateServiceType? {#authenticationrateservicetype}
|
|
58
|
+
|
|
59
|
+
> `optional` **authenticationRateServiceType?**: `string`
|
|
60
|
+
|
|
61
|
+
The rate service.
|
|
62
|
+
|
|
63
|
+
#### Default
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
authentication-rate
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
***
|
|
70
|
+
|
|
71
|
+
### tenantAdminComponentType? {#tenantadmincomponenttype}
|
|
72
|
+
|
|
73
|
+
> `optional` **tenantAdminComponentType?**: `string`
|
|
74
|
+
|
|
75
|
+
The component to retrieve tenant information.
|
|
40
76
|
|
|
41
77
|
#### Default
|
|
42
78
|
|
|
43
79
|
```ts
|
|
44
|
-
|
|
80
|
+
tenant-admin
|
|
45
81
|
```
|
|
46
82
|
|
|
47
83
|
***
|
|
48
84
|
|
|
49
|
-
### config?
|
|
85
|
+
### config? {#config}
|
|
50
86
|
|
|
51
|
-
> `optional` **config
|
|
87
|
+
> `optional` **config?**: [`IEntityStorageAuthenticationServiceConfig`](IEntityStorageAuthenticationServiceConfig.md)
|
|
52
88
|
|
|
53
89
|
The configuration for the authentication.
|
package/locales/en.json
CHANGED
|
@@ -8,17 +8,31 @@
|
|
|
8
8
|
"entityStorageAuthenticationAdminService": {
|
|
9
9
|
"userExists": "The user with the specified e-mail already exists",
|
|
10
10
|
"createUserFailed": "Creating the user failed",
|
|
11
|
+
"getUserFailed": "Getting the user failed",
|
|
12
|
+
"updateUserFailed": "Updating the user failed",
|
|
11
13
|
"removeUserFailed": "Removing the user failed",
|
|
12
14
|
"updatePasswordFailed": "Updating the user's password failed",
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
+
"userNotFound": "The user with the specified e-mail could not be found \"{notFoundId}\""
|
|
16
|
+
},
|
|
17
|
+
"passwordHelper": {
|
|
15
18
|
"currentPasswordMismatch": "The current password is incorrect"
|
|
16
19
|
},
|
|
20
|
+
"entityStorageAuthenticationRateService": {
|
|
21
|
+
"actionConfigMissing": "No rate-limit configuration exists for action \"{action}\".",
|
|
22
|
+
"rateLimitExceeded": "The rate limit for action \"{action}\" has been exceeded. Retry after {retryAfterSeconds} seconds."
|
|
23
|
+
},
|
|
17
24
|
"tokenHelper": {
|
|
18
25
|
"missing": "The JSON Web token could not be found in the authorization header",
|
|
19
26
|
"payloadMissingSubject": "The JSON Web token payload does not contain a subject",
|
|
20
27
|
"payloadMissingOrganization": "The JSON Web token payload does not contain an organization",
|
|
21
|
-
"expired": "The JSON Web token has expired"
|
|
28
|
+
"expired": "The JSON Web token has expired",
|
|
29
|
+
"insufficientScopes": "The JSON Web token does not have the required scopes to access this resource",
|
|
30
|
+
"userNotVerified": "The user associated with the JSON Web token could not be verified",
|
|
31
|
+
"organizationNotVerified": "The organization associated with the JSON Web token could not be verified",
|
|
32
|
+
"tenantNotVerified": "The tenant associated with the JSON Web token could not be verified"
|
|
33
|
+
},
|
|
34
|
+
"validation": {
|
|
35
|
+
"saltEntropyTooLow": "Salt must have at least 8 unique characters for sufficient entropy."
|
|
22
36
|
}
|
|
23
37
|
}
|
|
24
38
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/api-auth-entity-storage-service",
|
|
3
|
-
"version": "0.0.3-next.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.3-next.40",
|
|
4
|
+
"description": "Authentication service implementation and REST routes backed by entity storage.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/
|
|
7
|
+
"url": "git+https://github.com/iotaledger/twin-api.git",
|
|
8
8
|
"directory": "packages/api-auth-entity-storage-service"
|
|
9
9
|
},
|
|
10
10
|
"author": "martyn.janes@iota.org",
|
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/api-auth-entity-storage-models": "0.0.3-next.
|
|
18
|
-
"@twin.org/api-core": "0.0.3-next.
|
|
19
|
-
"@twin.org/api-models": "0.0.3-next.
|
|
17
|
+
"@twin.org/api-auth-entity-storage-models": "0.0.3-next.40",
|
|
18
|
+
"@twin.org/api-core": "0.0.3-next.40",
|
|
19
|
+
"@twin.org/api-models": "0.0.3-next.40",
|
|
20
|
+
"@twin.org/background-task-models": "next",
|
|
20
21
|
"@twin.org/context": "next",
|
|
21
22
|
"@twin.org/core": "next",
|
|
22
23
|
"@twin.org/crypto": "next",
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
"business-logic"
|
|
59
60
|
],
|
|
60
61
|
"bugs": {
|
|
61
|
-
"url": "git+https://github.com/
|
|
62
|
+
"url": "git+https://github.com/iotaledger/twin-api/issues"
|
|
62
63
|
},
|
|
63
64
|
"homepage": "https://twindev.org"
|
|
64
65
|
}
|