@twin.org/api-auth-entity-storage-service 0.0.3-next.21 → 0.0.3-next.23
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/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/index.js +9 -0
- 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 +18 -4
- package/dist/es/processors/authHeaderProcessor.js.map +1 -1
- package/dist/es/restEntryPoints.js +7 -0
- package/dist/es/restEntryPoints.js.map +1 -1
- package/dist/es/routes/entityStorageAuthenticationAuditRoutes.js +174 -0
- package/dist/es/routes/entityStorageAuthenticationAuditRoutes.js.map +1 -0
- package/dist/es/schema.js +4 -0
- package/dist/es/schema.js.map +1 -1
- package/dist/es/services/entityStorageAuthenticationAdminService.js +59 -4
- 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 +152 -8
- package/dist/es/services/entityStorageAuthenticationService.js.map +1 -1
- package/dist/es/utils/tokenHelper.js +11 -1
- 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/index.d.ts +9 -0
- package/dist/types/models/IAuthHeaderProcessorConstructorOptions.d.ts +5 -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 +17 -1
- package/dist/types/models/IEntityStorageAuthenticationServiceConstructorOptions.d.ts +10 -0
- package/dist/types/routes/entityStorageAuthenticationAuditRoutes.d.ts +29 -0
- 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 +6 -0
- package/dist/types/utils/tokenHelper.d.ts +2 -1
- package/docs/changelog.md +32 -0
- package/docs/reference/classes/AuthHeaderProcessor.md +9 -9
- package/docs/reference/classes/AuthenticationAuditEntry.md +101 -0
- package/docs/reference/classes/AuthenticationRateEntry.md +37 -0
- package/docs/reference/classes/AuthenticationUser.md +6 -6
- package/docs/reference/classes/EntityStorageAuthenticationAdminService.md +12 -12
- package/docs/reference/classes/EntityStorageAuthenticationAuditService.md +157 -0
- package/docs/reference/classes/EntityStorageAuthenticationRateService.md +227 -0
- package/docs/reference/classes/EntityStorageAuthenticationService.md +33 -7
- package/docs/reference/classes/TokenHelper.md +17 -11
- package/docs/reference/functions/authenticationAuditCreate.md +31 -0
- package/docs/reference/functions/authenticationAuditQuery.md +31 -0
- package/docs/reference/functions/generateRestRoutesAuthenticationAudit.md +25 -0
- package/docs/reference/index.md +12 -0
- package/docs/reference/interfaces/IAuthHeaderProcessorConfig.md +16 -4
- package/docs/reference/interfaces/IAuthHeaderProcessorConstructorOptions.md +24 -4
- package/docs/reference/interfaces/IEntityStorageAuthenticationAdminServiceConfig.md +8 -2
- package/docs/reference/interfaces/IEntityStorageAuthenticationAdminServiceConstructorOptions.md +24 -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 +58 -4
- package/docs/reference/interfaces/IEntityStorageAuthenticationServiceConstructorOptions.md +54 -8
- package/docs/reference/variables/tagsAuthenticationAudit.md +5 -0
- package/locales/en.json +10 -1
- package/package.json +5 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IAuthenticationRateActionConfig } from "@twin.org/api-auth-entity-storage-models";
|
|
1
2
|
/**
|
|
2
3
|
* Configuration for the entity storage authentication service.
|
|
3
4
|
*/
|
|
@@ -9,7 +10,22 @@ export interface IEntityStorageAuthenticationServiceConfig {
|
|
|
9
10
|
signingKeyName?: string;
|
|
10
11
|
/**
|
|
11
12
|
* The default time to live for the JWT.
|
|
12
|
-
* @default
|
|
13
|
+
* @default 60
|
|
13
14
|
*/
|
|
14
15
|
defaultTtlMinutes?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Optional override for login failure rate limit.
|
|
18
|
+
* @default { maxAttempts: 5, windowMinutes: 15 }
|
|
19
|
+
*/
|
|
20
|
+
loginRateLimit?: IAuthenticationRateActionConfig;
|
|
21
|
+
/**
|
|
22
|
+
* Optional override for password change rate limit.
|
|
23
|
+
* @default { maxAttempts: 5, windowMinutes: 15 }
|
|
24
|
+
*/
|
|
25
|
+
passwordChangeRateLimit?: IAuthenticationRateActionConfig;
|
|
26
|
+
/**
|
|
27
|
+
* Optional override for token refresh rate limit.
|
|
28
|
+
* @default { maxAttempts: 30, windowMinutes: 60 }
|
|
29
|
+
*/
|
|
30
|
+
tokenRefreshRateLimit?: IAuthenticationRateActionConfig;
|
|
15
31
|
}
|
|
@@ -18,6 +18,16 @@ export interface IEntityStorageAuthenticationServiceConstructorOptions {
|
|
|
18
18
|
* @default authentication-admin
|
|
19
19
|
*/
|
|
20
20
|
authenticationAdminServiceType?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The audit service.
|
|
23
|
+
* @default authentication-audit
|
|
24
|
+
*/
|
|
25
|
+
authenticationAuditServiceType?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The rate service.
|
|
28
|
+
* @default authentication-rate
|
|
29
|
+
*/
|
|
30
|
+
authenticationRateServiceType?: string;
|
|
21
31
|
/**
|
|
22
32
|
* The configuration for the authentication.
|
|
23
33
|
*/
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IAuditCreateRequest, IAuditQueryRequest, IAuditQueryResponse } from "@twin.org/api-auth-entity-storage-models";
|
|
2
|
+
import type { ICreatedResponse, IHttpRequestContext, IRestRoute, ITag } from "@twin.org/api-models";
|
|
3
|
+
/**
|
|
4
|
+
* The tag to associate with the routes.
|
|
5
|
+
*/
|
|
6
|
+
export declare const tagsAuthenticationAudit: ITag[];
|
|
7
|
+
/**
|
|
8
|
+
* The REST routes for authentication audit.
|
|
9
|
+
* @param baseRouteName Prefix to prepend to the paths.
|
|
10
|
+
* @param componentName The name of the component to use in the routes stored in the ComponentFactory.
|
|
11
|
+
* @returns The generated routes.
|
|
12
|
+
*/
|
|
13
|
+
export declare function generateRestRoutesAuthenticationAudit(baseRouteName: string, componentName: string): IRestRoute[];
|
|
14
|
+
/**
|
|
15
|
+
* Create an authentication audit entry.
|
|
16
|
+
* @param httpRequestContext The request context for the API.
|
|
17
|
+
* @param componentName The name of the component to use in the routes.
|
|
18
|
+
* @param request The request.
|
|
19
|
+
* @returns The response object with additional http response properties.
|
|
20
|
+
*/
|
|
21
|
+
export declare function authenticationAuditCreate(httpRequestContext: IHttpRequestContext, componentName: string, request: IAuditCreateRequest): Promise<ICreatedResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Query authentication audit entries.
|
|
24
|
+
* @param httpRequestContext The request context for the API.
|
|
25
|
+
* @param componentName The name of the component to use in the routes.
|
|
26
|
+
* @param request The request.
|
|
27
|
+
* @returns The response object with additional http response properties.
|
|
28
|
+
*/
|
|
29
|
+
export declare function authenticationAuditQuery(httpRequestContext: IHttpRequestContext, componentName: string, request: IAuditQueryRequest): Promise<IAuditQueryResponse>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { AuthAuditEvent, IAuthenticationAuditComponent, IAuthenticationAuditEntry } from "@twin.org/api-auth-entity-storage-models";
|
|
2
|
+
import type { IEntityStorageAuthenticationAuditServiceConstructorOptions } from "../models/IEntityStorageAuthenticationAuditServiceConstructorOptions.js";
|
|
3
|
+
/**
|
|
4
|
+
* Implementation of the authentication audit component using entity storage.
|
|
5
|
+
*/
|
|
6
|
+
export declare class EntityStorageAuthenticationAuditService implements IAuthenticationAuditComponent {
|
|
7
|
+
/**
|
|
8
|
+
* Runtime name for the class.
|
|
9
|
+
*/
|
|
10
|
+
static readonly CLASS_NAME: string;
|
|
11
|
+
/**
|
|
12
|
+
* Create a new instance of EntityStorageAuthenticationAuditService.
|
|
13
|
+
* @param options The dependencies for the identity connector.
|
|
14
|
+
*/
|
|
15
|
+
constructor(options?: IEntityStorageAuthenticationAuditServiceConstructorOptions);
|
|
16
|
+
/**
|
|
17
|
+
* Returns the class name of the component.
|
|
18
|
+
* @returns The class name of the component.
|
|
19
|
+
*/
|
|
20
|
+
className(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Create a new audit entry.
|
|
23
|
+
* @param entry The audit entry to be logged.
|
|
24
|
+
* @returns The unique identifier of the created audit entry.
|
|
25
|
+
*/
|
|
26
|
+
create(entry: Omit<IAuthenticationAuditEntry, "id" | "dateCreated">): Promise<string>;
|
|
27
|
+
/**
|
|
28
|
+
* Query the audit entries.
|
|
29
|
+
* @param options The query options.
|
|
30
|
+
* @param options.actorId The actor identifier to filter the audit entries, optional.
|
|
31
|
+
* @param options.organizationId The organization identifier to filter the audit entries, optional.
|
|
32
|
+
* @param options.tenantId The tenant identifier to filter the audit entries, optional.
|
|
33
|
+
* @param options.nodeId The node identifier to filter the audit entries, optional.
|
|
34
|
+
* @param options.event The audit event to filter the audit entries, optional.
|
|
35
|
+
* @param options.startDate The start date to filter the audit entries, optional.
|
|
36
|
+
* @param options.endDate The end date to filter the audit entries, optional.
|
|
37
|
+
* @param cursor The cursor for pagination.
|
|
38
|
+
* @param limit The maximum number of entries to return.
|
|
39
|
+
* @returns The audit entries.
|
|
40
|
+
*/
|
|
41
|
+
query(options?: {
|
|
42
|
+
actorId?: string;
|
|
43
|
+
organizationId?: string;
|
|
44
|
+
tenantId?: string;
|
|
45
|
+
nodeId?: string;
|
|
46
|
+
event?: AuthAuditEvent | string;
|
|
47
|
+
startDate?: string;
|
|
48
|
+
endDate?: string;
|
|
49
|
+
}, cursor?: string, limit?: number): Promise<{
|
|
50
|
+
entries: IAuthenticationAuditEntry[];
|
|
51
|
+
cursor?: string;
|
|
52
|
+
}>;
|
|
53
|
+
/**
|
|
54
|
+
* Hash a list of IP addresses using SHA-256.
|
|
55
|
+
* @param ipAddresses The IP addresses to hash.
|
|
56
|
+
* @returns The hexadecimal hashes of the salted IPs.
|
|
57
|
+
*/
|
|
58
|
+
private hashIpAddresses;
|
|
59
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { IAuthenticationRateActionConfig, IAuthenticationRateComponent } from "@twin.org/api-auth-entity-storage-models";
|
|
2
|
+
import type { IEntityStorageAuthenticationRateServiceConstructorOptions } from "../models/IEntityStorageAuthenticationRateServiceConstructorOptions.js";
|
|
3
|
+
/**
|
|
4
|
+
* Implementation of the authentication rate component using entity storage.
|
|
5
|
+
*/
|
|
6
|
+
export declare class EntityStorageAuthenticationRateService implements IAuthenticationRateComponent {
|
|
7
|
+
/**
|
|
8
|
+
* Runtime name for the class.
|
|
9
|
+
*/
|
|
10
|
+
static readonly CLASS_NAME: string;
|
|
11
|
+
/**
|
|
12
|
+
* Create a new instance of EntityStorageAuthenticationRateService.
|
|
13
|
+
* @param options The constructor options.
|
|
14
|
+
*/
|
|
15
|
+
constructor(options?: IEntityStorageAuthenticationRateServiceConstructorOptions);
|
|
16
|
+
/**
|
|
17
|
+
* Register or update rate-limit configuration for an action.
|
|
18
|
+
* @param action The action name.
|
|
19
|
+
* @param config The action configuration.
|
|
20
|
+
* @returns Nothing.
|
|
21
|
+
*/
|
|
22
|
+
registerAction(action: string, config: IAuthenticationRateActionConfig): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Unregister rate-limit configuration for an action.
|
|
25
|
+
* @param action The action name.
|
|
26
|
+
* @returns Nothing.
|
|
27
|
+
*/
|
|
28
|
+
unregisterAction(action: string): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Returns the class name of the component.
|
|
31
|
+
* @returns The class name of the component.
|
|
32
|
+
*/
|
|
33
|
+
className(): string;
|
|
34
|
+
/**
|
|
35
|
+
* The service needs to be started when the application is initialized.
|
|
36
|
+
* @param nodeLoggingComponentType The node logging component type.
|
|
37
|
+
* @returns Nothing.
|
|
38
|
+
*/
|
|
39
|
+
start(nodeLoggingComponentType?: string): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* The component needs to be stopped when the node is closed.
|
|
42
|
+
* @param nodeLoggingComponentType The node logging component type.
|
|
43
|
+
* @returns Nothing.
|
|
44
|
+
*/
|
|
45
|
+
stop(nodeLoggingComponentType?: string): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Check the authentication rate for a given action and identifier.
|
|
48
|
+
* @param action The action to be checked.
|
|
49
|
+
* @param identifier The identifier to be checked.
|
|
50
|
+
* @returns The rate entry id.
|
|
51
|
+
*/
|
|
52
|
+
check(action: string, identifier: string): Promise<string>;
|
|
53
|
+
/**
|
|
54
|
+
* Clear the authentication rate entry for the given action and identifier.
|
|
55
|
+
* @param action The action to clear.
|
|
56
|
+
* @param identifier The identifier to clear.
|
|
57
|
+
* @returns Nothing.
|
|
58
|
+
*/
|
|
59
|
+
clear(action: string, identifier: string): Promise<void>;
|
|
60
|
+
}
|
|
@@ -24,6 +24,12 @@ export declare class EntityStorageAuthenticationService implements IAuthenticati
|
|
|
24
24
|
* @returns Nothing.
|
|
25
25
|
*/
|
|
26
26
|
start(nodeLoggingComponentType?: string): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* The component needs to be stopped when the node is closed.
|
|
29
|
+
* @param nodeLoggingComponentType The node logging component type.
|
|
30
|
+
* @returns Nothing.
|
|
31
|
+
*/
|
|
32
|
+
stop(nodeLoggingComponentType?: string): Promise<void>;
|
|
27
33
|
/**
|
|
28
34
|
* Perform a login for the user.
|
|
29
35
|
* @param email The email address for the user.
|
|
@@ -29,10 +29,11 @@ export declare class TokenHelper {
|
|
|
29
29
|
* @param signingKeyName The signing key name.
|
|
30
30
|
* @param token The token to verify.
|
|
31
31
|
* @param requiredScopes The required scopes.
|
|
32
|
+
* @param verifyUser A function to verify the user identity and organization, which can be used to check if the user is still active or not.
|
|
32
33
|
* @returns The verified details.
|
|
33
34
|
* @throws UnauthorizedError if the token is missing, invalid or expired.
|
|
34
35
|
*/
|
|
35
|
-
static verify(vaultConnector: IVaultConnector, signingKeyName: string, token: string | undefined, requiredScopes?: string[]): Promise<{
|
|
36
|
+
static verify(vaultConnector: IVaultConnector, signingKeyName: string, token: string | undefined, requiredScopes?: string[], verifyUser?: (userIdentity: string, organizationIdentity: string) => Promise<string[]>): Promise<{
|
|
36
37
|
header: IJwtHeader;
|
|
37
38
|
payload: IJwtPayload;
|
|
38
39
|
}>;
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.23](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.3-next.22...api-auth-entity-storage-service-v0.0.3-next.23) (2026-04-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* auth enhancements ([#93](https://github.com/twinfoundation/api/issues/93)) ([921a50c](https://github.com/twinfoundation/api/commit/921a50cd89d26e530a6be6174a5a803060fa0eb6))
|
|
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.22 to 0.0.3-next.23
|
|
16
|
+
* @twin.org/api-core bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
17
|
+
* @twin.org/api-models bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
18
|
+
|
|
19
|
+
## [0.0.3-next.22](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.3-next.21...api-auth-entity-storage-service-v0.0.3-next.22) (2026-03-27)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Miscellaneous Chores
|
|
23
|
+
|
|
24
|
+
* **api-auth-entity-storage-service:** Synchronize repo versions
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Dependencies
|
|
28
|
+
|
|
29
|
+
* The following workspace dependencies were updated
|
|
30
|
+
* dependencies
|
|
31
|
+
* @twin.org/api-auth-entity-storage-models bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
32
|
+
* @twin.org/api-core bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
33
|
+
* @twin.org/api-models bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
34
|
+
|
|
3
35
|
## [0.0.3-next.21](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-service-v0.0.3-next.20...api-auth-entity-storage-service-v0.0.3-next.21) (2026-03-11)
|
|
4
36
|
|
|
5
37
|
|
|
@@ -28,7 +28,7 @@ Options for the processor.
|
|
|
28
28
|
|
|
29
29
|
## Properties
|
|
30
30
|
|
|
31
|
-
### CLASS\_NAME
|
|
31
|
+
### CLASS\_NAME {#class_name}
|
|
32
32
|
|
|
33
33
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
34
|
|
|
@@ -36,7 +36,7 @@ Runtime name for the class.
|
|
|
36
36
|
|
|
37
37
|
## Methods
|
|
38
38
|
|
|
39
|
-
### className()
|
|
39
|
+
### className() {#classname}
|
|
40
40
|
|
|
41
41
|
> **className**(): `string`
|
|
42
42
|
|
|
@@ -54,7 +54,7 @@ The class name of the component.
|
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
-
### start()
|
|
57
|
+
### start() {#start}
|
|
58
58
|
|
|
59
59
|
> **start**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
|
|
60
60
|
|
|
@@ -80,7 +80,7 @@ Nothing.
|
|
|
80
80
|
|
|
81
81
|
***
|
|
82
82
|
|
|
83
|
-
### pre()
|
|
83
|
+
### pre() {#pre}
|
|
84
84
|
|
|
85
85
|
> **pre**(`request`, `response`, `route`, `contextIds`, `processorState`): `Promise`\<`void`\>
|
|
86
86
|
|
|
@@ -102,9 +102,9 @@ The outgoing response.
|
|
|
102
102
|
|
|
103
103
|
##### route
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
`IBaseRoute` \| `undefined`
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
The route to process.
|
|
108
108
|
|
|
109
109
|
##### contextIds
|
|
110
110
|
|
|
@@ -126,7 +126,7 @@ The state handed through the processors.
|
|
|
126
126
|
|
|
127
127
|
***
|
|
128
128
|
|
|
129
|
-
### post()
|
|
129
|
+
### post() {#post}
|
|
130
130
|
|
|
131
131
|
> **post**(`request`, `response`, `route`, `contextIds`, `processorState`): `Promise`\<`void`\>
|
|
132
132
|
|
|
@@ -148,9 +148,9 @@ The outgoing response.
|
|
|
148
148
|
|
|
149
149
|
##### route
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
`IBaseRoute` \| `undefined`
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
The route to process.
|
|
154
154
|
|
|
155
155
|
##### contextIds
|
|
156
156
|
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Class: AuthenticationAuditEntry
|
|
2
|
+
|
|
3
|
+
Class defining the storage for authentication audit entries.
|
|
4
|
+
|
|
5
|
+
## Constructors
|
|
6
|
+
|
|
7
|
+
### Constructor
|
|
8
|
+
|
|
9
|
+
> **new AuthenticationAuditEntry**(): `AuthenticationAuditEntry`
|
|
10
|
+
|
|
11
|
+
#### Returns
|
|
12
|
+
|
|
13
|
+
`AuthenticationAuditEntry`
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
### id {#id}
|
|
18
|
+
|
|
19
|
+
> **id**: `string`
|
|
20
|
+
|
|
21
|
+
The unique identifier for the audit entry.
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### dateCreated {#datecreated}
|
|
26
|
+
|
|
27
|
+
> **dateCreated**: `string`
|
|
28
|
+
|
|
29
|
+
The timestamp of the audit entry in ISO 8601 format.
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### event {#event}
|
|
34
|
+
|
|
35
|
+
> **event**: `string`
|
|
36
|
+
|
|
37
|
+
The audit event that occurred.
|
|
38
|
+
|
|
39
|
+
***
|
|
40
|
+
|
|
41
|
+
### actorId? {#actorid}
|
|
42
|
+
|
|
43
|
+
> `optional` **actorId?**: `string`
|
|
44
|
+
|
|
45
|
+
The actor identifier, could be e-mail, username, or other unique identifier.
|
|
46
|
+
|
|
47
|
+
***
|
|
48
|
+
|
|
49
|
+
### nodeId? {#nodeid}
|
|
50
|
+
|
|
51
|
+
> `optional` **nodeId?**: `string`
|
|
52
|
+
|
|
53
|
+
The node identifier associated with the audit entry, if applicable.
|
|
54
|
+
|
|
55
|
+
***
|
|
56
|
+
|
|
57
|
+
### organizationId? {#organizationid}
|
|
58
|
+
|
|
59
|
+
> `optional` **organizationId?**: `string`
|
|
60
|
+
|
|
61
|
+
The organization identifier associated with the audit entry, if applicable.
|
|
62
|
+
|
|
63
|
+
***
|
|
64
|
+
|
|
65
|
+
### tenantId? {#tenantid}
|
|
66
|
+
|
|
67
|
+
> `optional` **tenantId?**: `string`
|
|
68
|
+
|
|
69
|
+
The tenant identifier associated with the audit entry, if applicable.
|
|
70
|
+
|
|
71
|
+
***
|
|
72
|
+
|
|
73
|
+
### ipAddressHashes? {#ipaddresshashes}
|
|
74
|
+
|
|
75
|
+
> `optional` **ipAddressHashes?**: `string`[]
|
|
76
|
+
|
|
77
|
+
The hashed IP addresses of the client.
|
|
78
|
+
|
|
79
|
+
***
|
|
80
|
+
|
|
81
|
+
### userAgent? {#useragent}
|
|
82
|
+
|
|
83
|
+
> `optional` **userAgent?**: `string`
|
|
84
|
+
|
|
85
|
+
The user agent string of the client.
|
|
86
|
+
|
|
87
|
+
***
|
|
88
|
+
|
|
89
|
+
### correlationId? {#correlationid}
|
|
90
|
+
|
|
91
|
+
> `optional` **correlationId?**: `string`
|
|
92
|
+
|
|
93
|
+
The correlation ID for request tracing.
|
|
94
|
+
|
|
95
|
+
***
|
|
96
|
+
|
|
97
|
+
### data? {#data}
|
|
98
|
+
|
|
99
|
+
> `optional` **data?**: `unknown`
|
|
100
|
+
|
|
101
|
+
Additional data related to the audit entry, such as IP address, user agent, etc.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Class: AuthenticationRateEntry
|
|
2
|
+
|
|
3
|
+
Class defining the storage for authentication rate entries.
|
|
4
|
+
|
|
5
|
+
## Constructors
|
|
6
|
+
|
|
7
|
+
### Constructor
|
|
8
|
+
|
|
9
|
+
> **new AuthenticationRateEntry**(): `AuthenticationRateEntry`
|
|
10
|
+
|
|
11
|
+
#### Returns
|
|
12
|
+
|
|
13
|
+
`AuthenticationRateEntry`
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
### id {#id}
|
|
18
|
+
|
|
19
|
+
> **id**: `string`
|
|
20
|
+
|
|
21
|
+
The id for the rate entry.
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### timestamps {#timestamps}
|
|
26
|
+
|
|
27
|
+
> **timestamps**: `string`[]
|
|
28
|
+
|
|
29
|
+
Array of ISO date strings representing timestamps of failed attempts.
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### dateModified {#datemodified}
|
|
34
|
+
|
|
35
|
+
> **dateModified**: `string`
|
|
36
|
+
|
|
37
|
+
Last modification time in ISO date format.
|
|
@@ -14,7 +14,7 @@ Class defining the storage for user login credentials.
|
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
### email
|
|
17
|
+
### email {#email}
|
|
18
18
|
|
|
19
19
|
> **email**: `string`
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ The user e-mail address.
|
|
|
22
22
|
|
|
23
23
|
***
|
|
24
24
|
|
|
25
|
-
### password
|
|
25
|
+
### password {#password}
|
|
26
26
|
|
|
27
27
|
> **password**: `string`
|
|
28
28
|
|
|
@@ -30,7 +30,7 @@ The encrypted password for the user.
|
|
|
30
30
|
|
|
31
31
|
***
|
|
32
32
|
|
|
33
|
-
### salt
|
|
33
|
+
### salt {#salt}
|
|
34
34
|
|
|
35
35
|
> **salt**: `string`
|
|
36
36
|
|
|
@@ -38,7 +38,7 @@ The salt for the password.
|
|
|
38
38
|
|
|
39
39
|
***
|
|
40
40
|
|
|
41
|
-
### identity
|
|
41
|
+
### identity {#identity}
|
|
42
42
|
|
|
43
43
|
> **identity**: `string`
|
|
44
44
|
|
|
@@ -46,7 +46,7 @@ The user identity.
|
|
|
46
46
|
|
|
47
47
|
***
|
|
48
48
|
|
|
49
|
-
### organization
|
|
49
|
+
### organization {#organization}
|
|
50
50
|
|
|
51
51
|
> **organization**: `string`
|
|
52
52
|
|
|
@@ -54,7 +54,7 @@ The users organization.
|
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
-
### scope
|
|
57
|
+
### scope {#scope}
|
|
58
58
|
|
|
59
59
|
> **scope**: `string`
|
|
60
60
|
|
|
@@ -28,7 +28,7 @@ The dependencies for the identity connector.
|
|
|
28
28
|
|
|
29
29
|
## Properties
|
|
30
30
|
|
|
31
|
-
### CLASS\_NAME
|
|
31
|
+
### CLASS\_NAME {#class_name}
|
|
32
32
|
|
|
33
33
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
34
|
|
|
@@ -36,7 +36,7 @@ Runtime name for the class.
|
|
|
36
36
|
|
|
37
37
|
## Methods
|
|
38
38
|
|
|
39
|
-
### className()
|
|
39
|
+
### className() {#classname}
|
|
40
40
|
|
|
41
41
|
> **className**(): `string`
|
|
42
42
|
|
|
@@ -54,7 +54,7 @@ The class name of the component.
|
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
-
### create()
|
|
57
|
+
### create() {#create}
|
|
58
58
|
|
|
59
59
|
> **create**(`user`): `Promise`\<`void`\>
|
|
60
60
|
|
|
@@ -80,7 +80,7 @@ Nothing.
|
|
|
80
80
|
|
|
81
81
|
***
|
|
82
82
|
|
|
83
|
-
### update()
|
|
83
|
+
### update() {#update}
|
|
84
84
|
|
|
85
85
|
> **update**(`user`): `Promise`\<`void`\>
|
|
86
86
|
|
|
@@ -106,9 +106,9 @@ Nothing.
|
|
|
106
106
|
|
|
107
107
|
***
|
|
108
108
|
|
|
109
|
-
### get()
|
|
109
|
+
### get() {#get}
|
|
110
110
|
|
|
111
|
-
> **get**(`email`): `Promise`\<`Omit`\<`IAuthenticationUser`, `"
|
|
111
|
+
> **get**(`email`): `Promise`\<`Omit`\<`IAuthenticationUser`, `"password"` \| `"salt"`\>\>
|
|
112
112
|
|
|
113
113
|
Get a user by email.
|
|
114
114
|
|
|
@@ -122,7 +122,7 @@ The email address of the user to get.
|
|
|
122
122
|
|
|
123
123
|
#### Returns
|
|
124
124
|
|
|
125
|
-
`Promise`\<`Omit`\<`IAuthenticationUser`, `"
|
|
125
|
+
`Promise`\<`Omit`\<`IAuthenticationUser`, `"password"` \| `"salt"`\>\>
|
|
126
126
|
|
|
127
127
|
The user details.
|
|
128
128
|
|
|
@@ -132,9 +132,9 @@ The user details.
|
|
|
132
132
|
|
|
133
133
|
***
|
|
134
134
|
|
|
135
|
-
### getByIdentity()
|
|
135
|
+
### getByIdentity() {#getbyidentity}
|
|
136
136
|
|
|
137
|
-
> **getByIdentity**(`identity`): `Promise`\<`Omit`\<`IAuthenticationUser`, `"
|
|
137
|
+
> **getByIdentity**(`identity`): `Promise`\<`Omit`\<`IAuthenticationUser`, `"password"` \| `"salt"`\>\>
|
|
138
138
|
|
|
139
139
|
Get a user by identity.
|
|
140
140
|
|
|
@@ -148,7 +148,7 @@ The identity of the user to get.
|
|
|
148
148
|
|
|
149
149
|
#### Returns
|
|
150
150
|
|
|
151
|
-
`Promise`\<`Omit`\<`IAuthenticationUser`, `"
|
|
151
|
+
`Promise`\<`Omit`\<`IAuthenticationUser`, `"password"` \| `"salt"`\>\>
|
|
152
152
|
|
|
153
153
|
The user details.
|
|
154
154
|
|
|
@@ -158,7 +158,7 @@ The user details.
|
|
|
158
158
|
|
|
159
159
|
***
|
|
160
160
|
|
|
161
|
-
### remove()
|
|
161
|
+
### remove() {#remove}
|
|
162
162
|
|
|
163
163
|
> **remove**(`email`): `Promise`\<`void`\>
|
|
164
164
|
|
|
@@ -184,7 +184,7 @@ Nothing.
|
|
|
184
184
|
|
|
185
185
|
***
|
|
186
186
|
|
|
187
|
-
### updatePassword()
|
|
187
|
+
### updatePassword() {#updatepassword}
|
|
188
188
|
|
|
189
189
|
> **updatePassword**(`email`, `newPassword`, `currentPassword?`): `Promise`\<`void`\>
|
|
190
190
|
|