@twin.org/api-auth-entity-storage-service 0.0.2-next.9 → 0.0.3-next.10
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/es/entities/authenticationUser.js +53 -0
- package/dist/es/entities/authenticationUser.js.map +1 -0
- package/dist/es/index.js +18 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IAuthHeaderProcessorConfig.js +4 -0
- package/dist/es/models/IAuthHeaderProcessorConfig.js.map +1 -0
- package/dist/es/models/IAuthHeaderProcessorConstructorOptions.js +2 -0
- package/dist/es/models/IAuthHeaderProcessorConstructorOptions.js.map +1 -0
- package/dist/es/models/IEntityStorageAuthenticationAdminServiceConfig.js +4 -0
- package/dist/es/models/IEntityStorageAuthenticationAdminServiceConfig.js.map +1 -0
- package/dist/es/models/IEntityStorageAuthenticationAdminServiceConstructorOptions.js +2 -0
- package/dist/es/models/IEntityStorageAuthenticationAdminServiceConstructorOptions.js.map +1 -0
- package/dist/es/models/IEntityStorageAuthenticationServiceConfig.js +4 -0
- package/dist/es/models/IEntityStorageAuthenticationServiceConfig.js.map +1 -0
- package/dist/es/models/IEntityStorageAuthenticationServiceConstructorOptions.js +2 -0
- package/dist/es/models/IEntityStorageAuthenticationServiceConstructorOptions.js.map +1 -0
- package/dist/es/processors/authHeaderProcessor.js +134 -0
- package/dist/es/processors/authHeaderProcessor.js.map +1 -0
- package/dist/es/restEntryPoints.js +10 -0
- package/dist/es/restEntryPoints.js.map +1 -0
- package/dist/es/routes/entityStorageAuthenticationRoutes.js +252 -0
- package/dist/es/routes/entityStorageAuthenticationRoutes.js.map +1 -0
- package/dist/es/schema.js +11 -0
- package/dist/es/schema.js.map +1 -0
- package/dist/es/services/entityStorageAuthenticationAdminService.js +146 -0
- package/dist/es/services/entityStorageAuthenticationAdminService.js.map +1 -0
- package/dist/es/services/entityStorageAuthenticationService.js +141 -0
- package/dist/es/services/entityStorageAuthenticationService.js.map +1 -0
- package/dist/es/utils/passwordHelper.js +29 -0
- package/dist/es/utils/passwordHelper.js.map +1 -0
- package/dist/es/utils/tokenHelper.js +94 -0
- package/dist/es/utils/tokenHelper.js.map +1 -0
- package/dist/types/entities/authenticationUser.d.ts +4 -0
- package/dist/types/index.d.ts +15 -15
- package/dist/types/models/IAuthHeaderProcessorConstructorOptions.d.ts +1 -1
- package/dist/types/models/IEntityStorageAuthenticationAdminServiceConstructorOptions.d.ts +1 -1
- package/dist/types/models/IEntityStorageAuthenticationServiceConstructorOptions.d.ts +1 -1
- package/dist/types/processors/authHeaderProcessor.d.ts +14 -9
- package/dist/types/services/entityStorageAuthenticationAdminService.d.ts +10 -4
- package/dist/types/services/entityStorageAuthenticationService.d.ts +9 -5
- package/dist/types/utils/passwordHelper.d.ts +4 -0
- package/dist/types/utils/tokenHelper.d.ts +8 -2
- package/docs/changelog.md +268 -0
- package/docs/reference/classes/AuthHeaderProcessor.md +28 -20
- package/docs/reference/classes/AuthenticationUser.md +8 -0
- package/docs/reference/classes/EntityStorageAuthenticationAdminService.md +25 -5
- package/docs/reference/classes/EntityStorageAuthenticationService.md +20 -12
- package/docs/reference/classes/PasswordHelper.md +8 -0
- package/docs/reference/classes/TokenHelper.md +27 -7
- package/locales/en.json +6 -6
- package/package.json +29 -11
- package/dist/cjs/index.cjs +0 -811
- package/dist/esm/index.mjs +0 -797
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IAuthenticationAdminComponent } from "@twin.org/api-auth-entity-storage-models";
|
|
2
|
-
import type { IEntityStorageAuthenticationAdminServiceConstructorOptions } from "../models/IEntityStorageAuthenticationAdminServiceConstructorOptions";
|
|
2
|
+
import type { IEntityStorageAuthenticationAdminServiceConstructorOptions } from "../models/IEntityStorageAuthenticationAdminServiceConstructorOptions.js";
|
|
3
3
|
/**
|
|
4
4
|
* Implementation of the authentication component using entity storage.
|
|
5
5
|
*/
|
|
@@ -7,20 +7,26 @@ export declare class EntityStorageAuthenticationAdminService implements IAuthent
|
|
|
7
7
|
/**
|
|
8
8
|
* Runtime name for the class.
|
|
9
9
|
*/
|
|
10
|
-
readonly CLASS_NAME: string;
|
|
10
|
+
static readonly CLASS_NAME: string;
|
|
11
11
|
/**
|
|
12
12
|
* Create a new instance of EntityStorageAuthentication.
|
|
13
13
|
* @param options The dependencies for the identity connector.
|
|
14
14
|
*/
|
|
15
15
|
constructor(options?: IEntityStorageAuthenticationAdminServiceConstructorOptions);
|
|
16
|
+
/**
|
|
17
|
+
* Returns the class name of the component.
|
|
18
|
+
* @returns The class name of the component.
|
|
19
|
+
*/
|
|
20
|
+
className(): string;
|
|
16
21
|
/**
|
|
17
22
|
* Create a login for the user.
|
|
18
23
|
* @param email The email address for the user.
|
|
19
24
|
* @param password The password for the user.
|
|
20
|
-
* @param
|
|
25
|
+
* @param userIdentity The DID to associate with the account.
|
|
26
|
+
* @param organizationIdentity The organization of the user.
|
|
21
27
|
* @returns Nothing.
|
|
22
28
|
*/
|
|
23
|
-
create(email: string, password: string,
|
|
29
|
+
create(email: string, password: string, userIdentity: string, organizationIdentity: string): Promise<void>;
|
|
24
30
|
/**
|
|
25
31
|
* Remove the current user.
|
|
26
32
|
* @param email The email address of the user to remove.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IAuthenticationComponent } from "@twin.org/api-auth-entity-storage-models";
|
|
2
|
-
import type { IEntityStorageAuthenticationServiceConstructorOptions } from "../models/IEntityStorageAuthenticationServiceConstructorOptions";
|
|
2
|
+
import type { IEntityStorageAuthenticationServiceConstructorOptions } from "../models/IEntityStorageAuthenticationServiceConstructorOptions.js";
|
|
3
3
|
/**
|
|
4
4
|
* Implementation of the authentication component using entity storage.
|
|
5
5
|
*/
|
|
@@ -7,19 +7,23 @@ export declare class EntityStorageAuthenticationService implements IAuthenticati
|
|
|
7
7
|
/**
|
|
8
8
|
* Runtime name for the class.
|
|
9
9
|
*/
|
|
10
|
-
readonly CLASS_NAME: string;
|
|
10
|
+
static readonly CLASS_NAME: string;
|
|
11
11
|
/**
|
|
12
12
|
* Create a new instance of EntityStorageAuthentication.
|
|
13
13
|
* @param options The dependencies for the identity connector.
|
|
14
14
|
*/
|
|
15
15
|
constructor(options?: IEntityStorageAuthenticationServiceConstructorOptions);
|
|
16
|
+
/**
|
|
17
|
+
* Returns the class name of the component.
|
|
18
|
+
* @returns The class name of the component.
|
|
19
|
+
*/
|
|
20
|
+
className(): string;
|
|
16
21
|
/**
|
|
17
22
|
* The service needs to be started when the application is initialized.
|
|
18
|
-
* @param nodeIdentity The identity of the node.
|
|
19
23
|
* @param nodeLoggingComponentType The node logging component type.
|
|
20
24
|
* @returns Nothing.
|
|
21
25
|
*/
|
|
22
|
-
start(
|
|
26
|
+
start(nodeLoggingComponentType?: string): Promise<void>;
|
|
23
27
|
/**
|
|
24
28
|
* Perform a login for the user.
|
|
25
29
|
* @param email The email address for the user.
|
|
@@ -42,7 +46,7 @@ export declare class EntityStorageAuthenticationService implements IAuthenticati
|
|
|
42
46
|
* @returns The refreshed token, if it uses a mechanism with public access.
|
|
43
47
|
*/
|
|
44
48
|
refresh(token?: string): Promise<{
|
|
45
|
-
token
|
|
49
|
+
token?: string;
|
|
46
50
|
expiry: number;
|
|
47
51
|
}>;
|
|
48
52
|
/**
|
|
@@ -4,15 +4,21 @@ import { type IHttpHeaders, type IJwtHeader, type IJwtPayload } from "@twin.org/
|
|
|
4
4
|
* Helper class for token operations.
|
|
5
5
|
*/
|
|
6
6
|
export declare class TokenHelper {
|
|
7
|
+
/**
|
|
8
|
+
* Runtime name for the class.
|
|
9
|
+
*/
|
|
10
|
+
static readonly CLASS_NAME: string;
|
|
7
11
|
/**
|
|
8
12
|
* Create a new token.
|
|
9
13
|
* @param vaultConnector The vault connector.
|
|
10
14
|
* @param signingKeyName The signing key name.
|
|
11
|
-
* @param
|
|
15
|
+
* @param userIdentity The subject for the token.
|
|
16
|
+
* @param organizationIdentity The organization for the token.
|
|
17
|
+
* @param tenantId The tenant id for the token.
|
|
12
18
|
* @param ttlMinutes The time to live for the token in minutes.
|
|
13
19
|
* @returns The new token and its expiry date.
|
|
14
20
|
*/
|
|
15
|
-
static createToken(vaultConnector: IVaultConnector, signingKeyName: string,
|
|
21
|
+
static createToken(vaultConnector: IVaultConnector, signingKeyName: string, userIdentity: string, organizationIdentity: string | undefined, tenantId: string | undefined, ttlMinutes: number): Promise<{
|
|
16
22
|
token: string;
|
|
17
23
|
expiry: number;
|
|
18
24
|
}>;
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,273 @@
|
|
|
1
1
|
# @twin.org/api-auth-entity-storage-service - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.10](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.3-next.9...api-auth-entity-storage-service-v0.0.3-next.10) (2026-01-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* remove token from return payload ([eaa4266](https://github.com/twinfoundation/api/commit/eaa42661b8540881b0751f5d2513258b3413f3ef))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/api-auth-entity-storage-models bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
16
|
+
* @twin.org/api-core bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
17
|
+
* @twin.org/api-models bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
18
|
+
|
|
19
|
+
## [0.0.3-next.9](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.3-next.8...api-auth-entity-storage-service-v0.0.3-next.9) (2026-01-05)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* add context id features ([#42](https://github.com/twinfoundation/api/issues/42)) ([0186055](https://github.com/twinfoundation/api/commit/0186055c48afde842a4254b4df9ac9249c40fe40))
|
|
25
|
+
* add json-ld mime type processor and auth admin component ([8861791](https://github.com/twinfoundation/api/commit/88617916e23bfbca023dbae1976fe421983a02ff))
|
|
26
|
+
* add livez endpoint ([#57](https://github.com/twinfoundation/api/issues/57)) ([ef007db](https://github.com/twinfoundation/api/commit/ef007db8201736dd3053211f849ffd03baaa485e))
|
|
27
|
+
* add validate-locales ([cdba610](https://github.com/twinfoundation/api/commit/cdba610a0acb5022d2e3ce729732e6646a297e5e))
|
|
28
|
+
* check tenant id in auth if set ([66f7337](https://github.com/twinfoundation/api/commit/66f73374d3cf4c1c85ea96ec74bb30712fb84dd7))
|
|
29
|
+
* eslint migration to flat config ([0dd5820](https://github.com/twinfoundation/api/commit/0dd5820e3af97350fd08b8d226f4a6c1a9246805))
|
|
30
|
+
* modify authHeaderProcessor to retain token in response body ([#53](https://github.com/twinfoundation/api/issues/53)) ([5d9ae76](https://github.com/twinfoundation/api/commit/5d9ae76b5b52a8e10dac391b2d5784638a186583))
|
|
31
|
+
* remove unused namespace ([08478f2](https://github.com/twinfoundation/api/commit/08478f27efda9beb0271fdb22f6972e918361965))
|
|
32
|
+
* update dependencies ([1171dc4](https://github.com/twinfoundation/api/commit/1171dc416a9481737f6a640e3cf30145768f37e9))
|
|
33
|
+
* update framework core ([d8eebf2](https://github.com/twinfoundation/api/commit/d8eebf267fa2a0abaa84e58590496e9d20490cfa))
|
|
34
|
+
* update IComponent signatures ([915ce37](https://github.com/twinfoundation/api/commit/915ce37712326ab4aa6869c350eabaa4622e8430))
|
|
35
|
+
* use new extractBearer method ([3e0cc54](https://github.com/twinfoundation/api/commit/3e0cc5462c06f59a6b744386eeff8326e5abbc95))
|
|
36
|
+
* use new extractBearerToken method ([df654e9](https://github.com/twinfoundation/api/commit/df654e9caee5bd62f0be36f7be9902c8fab6ead6))
|
|
37
|
+
* use shared store mechanism ([#19](https://github.com/twinfoundation/api/issues/19)) ([32116df](https://github.com/twinfoundation/api/commit/32116df3b4380a30137f5056f242a5c99afa2df9))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Bug Fixes
|
|
41
|
+
|
|
42
|
+
* include org in context ids from jwt ([a12cfdd](https://github.com/twinfoundation/api/commit/a12cfdddb05e2ed0300b26f3d7c0cfc033e59bd3))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Dependencies
|
|
46
|
+
|
|
47
|
+
* The following workspace dependencies were updated
|
|
48
|
+
* dependencies
|
|
49
|
+
* @twin.org/api-auth-entity-storage-models bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
50
|
+
* @twin.org/api-core bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
51
|
+
* @twin.org/api-models bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
52
|
+
|
|
53
|
+
## [0.0.3-next.8](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.3-next.7...api-auth-entity-storage-service-v0.0.3-next.8) (2025-12-17)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Miscellaneous Chores
|
|
57
|
+
|
|
58
|
+
* **api-auth-entity-storage-service:** Synchronize repo versions
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### Dependencies
|
|
62
|
+
|
|
63
|
+
* The following workspace dependencies were updated
|
|
64
|
+
* dependencies
|
|
65
|
+
* @twin.org/api-auth-entity-storage-models bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
66
|
+
* @twin.org/api-core bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
67
|
+
* @twin.org/api-models bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
68
|
+
|
|
69
|
+
## [0.0.3-next.7](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.3-next.6...api-auth-entity-storage-service-v0.0.3-next.7) (2025-11-26)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Miscellaneous Chores
|
|
73
|
+
|
|
74
|
+
* **api-auth-entity-storage-service:** Synchronize repo versions
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### Dependencies
|
|
78
|
+
|
|
79
|
+
* The following workspace dependencies were updated
|
|
80
|
+
* dependencies
|
|
81
|
+
* @twin.org/api-auth-entity-storage-models bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
82
|
+
* @twin.org/api-core bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
83
|
+
* @twin.org/api-models bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
84
|
+
|
|
85
|
+
## [0.0.3-next.6](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.3-next.5...api-auth-entity-storage-service-v0.0.3-next.6) (2025-11-20)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
### Features
|
|
89
|
+
|
|
90
|
+
* check tenant id in auth if set ([66f7337](https://github.com/twinfoundation/api/commit/66f73374d3cf4c1c85ea96ec74bb30712fb84dd7))
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
### Dependencies
|
|
94
|
+
|
|
95
|
+
* The following workspace dependencies were updated
|
|
96
|
+
* dependencies
|
|
97
|
+
* @twin.org/api-auth-entity-storage-models bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
98
|
+
* @twin.org/api-core bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
99
|
+
* @twin.org/api-models bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
100
|
+
|
|
101
|
+
## [0.0.3-next.5](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.3-next.4...api-auth-entity-storage-service-v0.0.3-next.5) (2025-11-14)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### Miscellaneous Chores
|
|
105
|
+
|
|
106
|
+
* **api-auth-entity-storage-service:** Synchronize repo versions
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### Dependencies
|
|
110
|
+
|
|
111
|
+
* The following workspace dependencies were updated
|
|
112
|
+
* dependencies
|
|
113
|
+
* @twin.org/api-auth-entity-storage-models bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
114
|
+
* @twin.org/api-core bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
115
|
+
* @twin.org/api-models bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
116
|
+
|
|
117
|
+
## [0.0.3-next.4](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.3-next.3...api-auth-entity-storage-service-v0.0.3-next.4) (2025-11-14)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
### Features
|
|
121
|
+
|
|
122
|
+
* add context id features ([#42](https://github.com/twinfoundation/api/issues/42)) ([0186055](https://github.com/twinfoundation/api/commit/0186055c48afde842a4254b4df9ac9249c40fe40))
|
|
123
|
+
* add json-ld mime type processor and auth admin component ([8861791](https://github.com/twinfoundation/api/commit/88617916e23bfbca023dbae1976fe421983a02ff))
|
|
124
|
+
* add validate-locales ([cdba610](https://github.com/twinfoundation/api/commit/cdba610a0acb5022d2e3ce729732e6646a297e5e))
|
|
125
|
+
* eslint migration to flat config ([0dd5820](https://github.com/twinfoundation/api/commit/0dd5820e3af97350fd08b8d226f4a6c1a9246805))
|
|
126
|
+
* remove unused namespace ([08478f2](https://github.com/twinfoundation/api/commit/08478f27efda9beb0271fdb22f6972e918361965))
|
|
127
|
+
* update dependencies ([1171dc4](https://github.com/twinfoundation/api/commit/1171dc416a9481737f6a640e3cf30145768f37e9))
|
|
128
|
+
* update framework core ([d8eebf2](https://github.com/twinfoundation/api/commit/d8eebf267fa2a0abaa84e58590496e9d20490cfa))
|
|
129
|
+
* update IComponent signatures ([915ce37](https://github.com/twinfoundation/api/commit/915ce37712326ab4aa6869c350eabaa4622e8430))
|
|
130
|
+
* use new extractBearer method ([3e0cc54](https://github.com/twinfoundation/api/commit/3e0cc5462c06f59a6b744386eeff8326e5abbc95))
|
|
131
|
+
* use new extractBearerToken method ([df654e9](https://github.com/twinfoundation/api/commit/df654e9caee5bd62f0be36f7be9902c8fab6ead6))
|
|
132
|
+
* use shared store mechanism ([#19](https://github.com/twinfoundation/api/issues/19)) ([32116df](https://github.com/twinfoundation/api/commit/32116df3b4380a30137f5056f242a5c99afa2df9))
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
### Bug Fixes
|
|
136
|
+
|
|
137
|
+
* include org in context ids from jwt ([a12cfdd](https://github.com/twinfoundation/api/commit/a12cfdddb05e2ed0300b26f3d7c0cfc033e59bd3))
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
### Dependencies
|
|
141
|
+
|
|
142
|
+
* The following workspace dependencies were updated
|
|
143
|
+
* dependencies
|
|
144
|
+
* @twin.org/api-auth-entity-storage-models bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
145
|
+
* @twin.org/api-core bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
146
|
+
* @twin.org/api-models bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
147
|
+
|
|
148
|
+
## [0.0.3-next.3](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.3-next.2...api-auth-entity-storage-service-v0.0.3-next.3) (2025-11-14)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
### Bug Fixes
|
|
152
|
+
|
|
153
|
+
* include org in context ids from jwt ([a12cfdd](https://github.com/twinfoundation/api/commit/a12cfdddb05e2ed0300b26f3d7c0cfc033e59bd3))
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
### Dependencies
|
|
157
|
+
|
|
158
|
+
* The following workspace dependencies were updated
|
|
159
|
+
* dependencies
|
|
160
|
+
* @twin.org/api-auth-entity-storage-models bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
161
|
+
* @twin.org/api-core bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
162
|
+
* @twin.org/api-models bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
163
|
+
|
|
164
|
+
## [0.0.3-next.2](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.3-next.1...api-auth-entity-storage-service-v0.0.3-next.2) (2025-11-12)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
### Miscellaneous Chores
|
|
168
|
+
|
|
169
|
+
* **api-auth-entity-storage-service:** Synchronize repo versions
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
### Dependencies
|
|
173
|
+
|
|
174
|
+
* The following workspace dependencies were updated
|
|
175
|
+
* dependencies
|
|
176
|
+
* @twin.org/api-auth-entity-storage-models bumped from 0.0.3-next.1 to 0.0.3-next.2
|
|
177
|
+
* @twin.org/api-core bumped from 0.0.3-next.1 to 0.0.3-next.2
|
|
178
|
+
* @twin.org/api-models bumped from 0.0.3-next.1 to 0.0.3-next.2
|
|
179
|
+
|
|
180
|
+
## [0.0.3-next.1](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.3-next.0...api-auth-entity-storage-service-v0.0.3-next.1) (2025-11-10)
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
### Features
|
|
184
|
+
|
|
185
|
+
* add context id features ([#42](https://github.com/twinfoundation/api/issues/42)) ([0186055](https://github.com/twinfoundation/api/commit/0186055c48afde842a4254b4df9ac9249c40fe40))
|
|
186
|
+
* add json-ld mime type processor and auth admin component ([8861791](https://github.com/twinfoundation/api/commit/88617916e23bfbca023dbae1976fe421983a02ff))
|
|
187
|
+
* add validate-locales ([cdba610](https://github.com/twinfoundation/api/commit/cdba610a0acb5022d2e3ce729732e6646a297e5e))
|
|
188
|
+
* eslint migration to flat config ([0dd5820](https://github.com/twinfoundation/api/commit/0dd5820e3af97350fd08b8d226f4a6c1a9246805))
|
|
189
|
+
* remove unused namespace ([08478f2](https://github.com/twinfoundation/api/commit/08478f27efda9beb0271fdb22f6972e918361965))
|
|
190
|
+
* update dependencies ([1171dc4](https://github.com/twinfoundation/api/commit/1171dc416a9481737f6a640e3cf30145768f37e9))
|
|
191
|
+
* update framework core ([d8eebf2](https://github.com/twinfoundation/api/commit/d8eebf267fa2a0abaa84e58590496e9d20490cfa))
|
|
192
|
+
* update IComponent signatures ([915ce37](https://github.com/twinfoundation/api/commit/915ce37712326ab4aa6869c350eabaa4622e8430))
|
|
193
|
+
* use new extractBearer method ([3e0cc54](https://github.com/twinfoundation/api/commit/3e0cc5462c06f59a6b744386eeff8326e5abbc95))
|
|
194
|
+
* use new extractBearerToken method ([df654e9](https://github.com/twinfoundation/api/commit/df654e9caee5bd62f0be36f7be9902c8fab6ead6))
|
|
195
|
+
* use shared store mechanism ([#19](https://github.com/twinfoundation/api/issues/19)) ([32116df](https://github.com/twinfoundation/api/commit/32116df3b4380a30137f5056f242a5c99afa2df9))
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
### Dependencies
|
|
199
|
+
|
|
200
|
+
* The following workspace dependencies were updated
|
|
201
|
+
* dependencies
|
|
202
|
+
* @twin.org/api-auth-entity-storage-models bumped from 0.0.3-next.0 to 0.0.3-next.1
|
|
203
|
+
* @twin.org/api-core bumped from 0.0.3-next.0 to 0.0.3-next.1
|
|
204
|
+
* @twin.org/api-models bumped from 0.0.3-next.0 to 0.0.3-next.1
|
|
205
|
+
|
|
206
|
+
## [0.0.2-next.13](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.2-next.12...api-auth-entity-storage-service-v0.0.2-next.13) (2025-10-09)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
### Miscellaneous Chores
|
|
210
|
+
|
|
211
|
+
* **api-auth-entity-storage-service:** Synchronize repo versions
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
### Dependencies
|
|
215
|
+
|
|
216
|
+
* The following workspace dependencies were updated
|
|
217
|
+
* dependencies
|
|
218
|
+
* @twin.org/api-auth-entity-storage-models bumped from 0.0.2-next.12 to 0.0.2-next.13
|
|
219
|
+
* @twin.org/api-core bumped from 0.0.2-next.12 to 0.0.2-next.13
|
|
220
|
+
* @twin.org/api-models bumped from 0.0.2-next.12 to 0.0.2-next.13
|
|
221
|
+
|
|
222
|
+
## [0.0.2-next.12](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.2-next.11...api-auth-entity-storage-service-v0.0.2-next.12) (2025-10-09)
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
### Features
|
|
226
|
+
|
|
227
|
+
* add validate-locales ([cdba610](https://github.com/twinfoundation/api/commit/cdba610a0acb5022d2e3ce729732e6646a297e5e))
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
### Dependencies
|
|
231
|
+
|
|
232
|
+
* The following workspace dependencies were updated
|
|
233
|
+
* dependencies
|
|
234
|
+
* @twin.org/api-auth-entity-storage-models bumped from 0.0.2-next.11 to 0.0.2-next.12
|
|
235
|
+
* @twin.org/api-core bumped from 0.0.2-next.11 to 0.0.2-next.12
|
|
236
|
+
* @twin.org/api-models bumped from 0.0.2-next.11 to 0.0.2-next.12
|
|
237
|
+
|
|
238
|
+
## [0.0.2-next.11](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.2-next.10...api-auth-entity-storage-service-v0.0.2-next.11) (2025-09-29)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
### Features
|
|
242
|
+
|
|
243
|
+
* update IComponent signatures ([915ce37](https://github.com/twinfoundation/api/commit/915ce37712326ab4aa6869c350eabaa4622e8430))
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
### Dependencies
|
|
247
|
+
|
|
248
|
+
* The following workspace dependencies were updated
|
|
249
|
+
* dependencies
|
|
250
|
+
* @twin.org/api-auth-entity-storage-models bumped from 0.0.2-next.10 to 0.0.2-next.11
|
|
251
|
+
* @twin.org/api-core bumped from 0.0.2-next.10 to 0.0.2-next.11
|
|
252
|
+
* @twin.org/api-models bumped from 0.0.2-next.10 to 0.0.2-next.11
|
|
253
|
+
|
|
254
|
+
## [0.0.2-next.10](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.2-next.9...api-auth-entity-storage-service-v0.0.2-next.10) (2025-09-23)
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
### Features
|
|
258
|
+
|
|
259
|
+
* use new extractBearer method ([3e0cc54](https://github.com/twinfoundation/api/commit/3e0cc5462c06f59a6b744386eeff8326e5abbc95))
|
|
260
|
+
* use new extractBearerToken method ([df654e9](https://github.com/twinfoundation/api/commit/df654e9caee5bd62f0be36f7be9902c8fab6ead6))
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
### Dependencies
|
|
264
|
+
|
|
265
|
+
* The following workspace dependencies were updated
|
|
266
|
+
* dependencies
|
|
267
|
+
* @twin.org/api-auth-entity-storage-models bumped from 0.0.2-next.9 to 0.0.2-next.10
|
|
268
|
+
* @twin.org/api-core bumped from 0.0.2-next.9 to 0.0.2-next.10
|
|
269
|
+
* @twin.org/api-models bumped from 0.0.2-next.9 to 0.0.2-next.10
|
|
270
|
+
|
|
3
271
|
## [0.0.2-next.9](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.2-next.8...api-auth-entity-storage-service-v0.0.2-next.9) (2025-08-29)
|
|
4
272
|
|
|
5
273
|
|
|
@@ -30,30 +30,38 @@ Options for the processor.
|
|
|
30
30
|
|
|
31
31
|
### CLASS\_NAME
|
|
32
32
|
|
|
33
|
-
> `readonly` **CLASS\_NAME**: `string`
|
|
33
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
34
|
|
|
35
35
|
Runtime name for the class.
|
|
36
36
|
|
|
37
|
+
## Methods
|
|
38
|
+
|
|
39
|
+
### className()
|
|
40
|
+
|
|
41
|
+
> **className**(): `string`
|
|
42
|
+
|
|
43
|
+
Returns the class name of the component.
|
|
44
|
+
|
|
45
|
+
#### Returns
|
|
46
|
+
|
|
47
|
+
`string`
|
|
48
|
+
|
|
49
|
+
The class name of the component.
|
|
50
|
+
|
|
37
51
|
#### Implementation of
|
|
38
52
|
|
|
39
|
-
`IBaseRouteProcessor.
|
|
53
|
+
`IBaseRouteProcessor.className`
|
|
40
54
|
|
|
41
|
-
|
|
55
|
+
***
|
|
42
56
|
|
|
43
57
|
### start()
|
|
44
58
|
|
|
45
|
-
> **start**(`
|
|
59
|
+
> **start**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
|
|
46
60
|
|
|
47
61
|
The service needs to be started when the application is initialized.
|
|
48
62
|
|
|
49
63
|
#### Parameters
|
|
50
64
|
|
|
51
|
-
##### nodeIdentity
|
|
52
|
-
|
|
53
|
-
`string`
|
|
54
|
-
|
|
55
|
-
The identity of the node.
|
|
56
|
-
|
|
57
65
|
##### nodeLoggingComponentType?
|
|
58
66
|
|
|
59
67
|
`string`
|
|
@@ -74,7 +82,7 @@ Nothing.
|
|
|
74
82
|
|
|
75
83
|
### pre()
|
|
76
84
|
|
|
77
|
-
> **pre**(`request`, `response`, `route`, `
|
|
85
|
+
> **pre**(`request`, `response`, `route`, `contextIds`, `processorState`): `Promise`\<`void`\>
|
|
78
86
|
|
|
79
87
|
Pre process the REST request for the specified route.
|
|
80
88
|
|
|
@@ -96,13 +104,13 @@ The outgoing response.
|
|
|
96
104
|
|
|
97
105
|
The route to process.
|
|
98
106
|
|
|
99
|
-
`
|
|
107
|
+
`IBaseRoute` | `undefined`
|
|
100
108
|
|
|
101
|
-
#####
|
|
109
|
+
##### contextIds
|
|
102
110
|
|
|
103
|
-
`
|
|
111
|
+
`IContextIds`
|
|
104
112
|
|
|
105
|
-
The
|
|
113
|
+
The context IDs of the request.
|
|
106
114
|
|
|
107
115
|
##### processorState
|
|
108
116
|
|
|
@@ -120,7 +128,7 @@ The state handed through the processors.
|
|
|
120
128
|
|
|
121
129
|
### post()
|
|
122
130
|
|
|
123
|
-
> **post**(`request`, `response`, `route`, `
|
|
131
|
+
> **post**(`request`, `response`, `route`, `contextIds`, `processorState`): `Promise`\<`void`\>
|
|
124
132
|
|
|
125
133
|
Post process the REST request for the specified route.
|
|
126
134
|
|
|
@@ -142,13 +150,13 @@ The outgoing response.
|
|
|
142
150
|
|
|
143
151
|
The route to process.
|
|
144
152
|
|
|
145
|
-
`
|
|
153
|
+
`IBaseRoute` | `undefined`
|
|
146
154
|
|
|
147
|
-
#####
|
|
155
|
+
##### contextIds
|
|
148
156
|
|
|
149
|
-
`
|
|
157
|
+
`IContextIds`
|
|
150
158
|
|
|
151
|
-
The
|
|
159
|
+
The context IDs of the request.
|
|
152
160
|
|
|
153
161
|
##### processorState
|
|
154
162
|
|
|
@@ -30,19 +30,33 @@ The dependencies for the identity connector.
|
|
|
30
30
|
|
|
31
31
|
### CLASS\_NAME
|
|
32
32
|
|
|
33
|
-
> `readonly` **CLASS\_NAME**: `string`
|
|
33
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
34
|
|
|
35
35
|
Runtime name for the class.
|
|
36
36
|
|
|
37
|
+
## Methods
|
|
38
|
+
|
|
39
|
+
### className()
|
|
40
|
+
|
|
41
|
+
> **className**(): `string`
|
|
42
|
+
|
|
43
|
+
Returns the class name of the component.
|
|
44
|
+
|
|
45
|
+
#### Returns
|
|
46
|
+
|
|
47
|
+
`string`
|
|
48
|
+
|
|
49
|
+
The class name of the component.
|
|
50
|
+
|
|
37
51
|
#### Implementation of
|
|
38
52
|
|
|
39
|
-
`IAuthenticationAdminComponent.
|
|
53
|
+
`IAuthenticationAdminComponent.className`
|
|
40
54
|
|
|
41
|
-
|
|
55
|
+
***
|
|
42
56
|
|
|
43
57
|
### create()
|
|
44
58
|
|
|
45
|
-
> **create**(`email`, `password`, `
|
|
59
|
+
> **create**(`email`, `password`, `userIdentity`, `organizationIdentity`): `Promise`\<`void`\>
|
|
46
60
|
|
|
47
61
|
Create a login for the user.
|
|
48
62
|
|
|
@@ -60,12 +74,18 @@ The email address for the user.
|
|
|
60
74
|
|
|
61
75
|
The password for the user.
|
|
62
76
|
|
|
63
|
-
#####
|
|
77
|
+
##### userIdentity
|
|
64
78
|
|
|
65
79
|
`string`
|
|
66
80
|
|
|
67
81
|
The DID to associate with the account.
|
|
68
82
|
|
|
83
|
+
##### organizationIdentity
|
|
84
|
+
|
|
85
|
+
`string`
|
|
86
|
+
|
|
87
|
+
The organization of the user.
|
|
88
|
+
|
|
69
89
|
#### Returns
|
|
70
90
|
|
|
71
91
|
`Promise`\<`void`\>
|
|
@@ -30,30 +30,38 @@ The dependencies for the identity connector.
|
|
|
30
30
|
|
|
31
31
|
### CLASS\_NAME
|
|
32
32
|
|
|
33
|
-
> `readonly` **CLASS\_NAME**: `string`
|
|
33
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
34
|
|
|
35
35
|
Runtime name for the class.
|
|
36
36
|
|
|
37
|
+
## Methods
|
|
38
|
+
|
|
39
|
+
### className()
|
|
40
|
+
|
|
41
|
+
> **className**(): `string`
|
|
42
|
+
|
|
43
|
+
Returns the class name of the component.
|
|
44
|
+
|
|
45
|
+
#### Returns
|
|
46
|
+
|
|
47
|
+
`string`
|
|
48
|
+
|
|
49
|
+
The class name of the component.
|
|
50
|
+
|
|
37
51
|
#### Implementation of
|
|
38
52
|
|
|
39
|
-
`IAuthenticationComponent.
|
|
53
|
+
`IAuthenticationComponent.className`
|
|
40
54
|
|
|
41
|
-
|
|
55
|
+
***
|
|
42
56
|
|
|
43
57
|
### start()
|
|
44
58
|
|
|
45
|
-
> **start**(`
|
|
59
|
+
> **start**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
|
|
46
60
|
|
|
47
61
|
The service needs to be started when the application is initialized.
|
|
48
62
|
|
|
49
63
|
#### Parameters
|
|
50
64
|
|
|
51
|
-
##### nodeIdentity
|
|
52
|
-
|
|
53
|
-
`string`
|
|
54
|
-
|
|
55
|
-
The identity of the node.
|
|
56
|
-
|
|
57
65
|
##### nodeLoggingComponentType?
|
|
58
66
|
|
|
59
67
|
`string`
|
|
@@ -132,7 +140,7 @@ Nothing.
|
|
|
132
140
|
|
|
133
141
|
### refresh()
|
|
134
142
|
|
|
135
|
-
> **refresh**(`token?`): `Promise`\<\{ `token
|
|
143
|
+
> **refresh**(`token?`): `Promise`\<\{ `token?`: `string`; `expiry`: `number`; \}\>
|
|
136
144
|
|
|
137
145
|
Refresh the token.
|
|
138
146
|
|
|
@@ -146,7 +154,7 @@ The token to refresh, if it uses a mechanism with public access.
|
|
|
146
154
|
|
|
147
155
|
#### Returns
|
|
148
156
|
|
|
149
|
-
`Promise`\<\{ `token
|
|
157
|
+
`Promise`\<\{ `token?`: `string`; `expiry`: `number`; \}\>
|
|
150
158
|
|
|
151
159
|
The refreshed token, if it uses a mechanism with public access.
|
|
152
160
|
|