@3sixty/api-auth-entity-storage-service 0.0.0-stage → 0.20.0-next.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.
Files changed (133) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +24 -2
  3. package/dist/es/entities/authenticationAuditEntry.js +121 -0
  4. package/dist/es/entities/authenticationAuditEntry.js.map +1 -0
  5. package/dist/es/entities/authenticationRateEntry.js +37 -0
  6. package/dist/es/entities/authenticationRateEntry.js.map +1 -0
  7. package/dist/es/entities/authenticationUser.js +69 -0
  8. package/dist/es/entities/authenticationUser.js.map +1 -0
  9. package/dist/es/index.js +29 -0
  10. package/dist/es/index.js.map +1 -0
  11. package/dist/es/models/IAuthHeaderProcessorConfig.js +4 -0
  12. package/dist/es/models/IAuthHeaderProcessorConfig.js.map +1 -0
  13. package/dist/es/models/IAuthHeaderProcessorConstructorOptions.js +2 -0
  14. package/dist/es/models/IAuthHeaderProcessorConstructorOptions.js.map +1 -0
  15. package/dist/es/models/IAuthTokenContext.js +4 -0
  16. package/dist/es/models/IAuthTokenContext.js.map +1 -0
  17. package/dist/es/models/IEntityStorageAuthenticationAdminServiceConfig.js +4 -0
  18. package/dist/es/models/IEntityStorageAuthenticationAdminServiceConfig.js.map +1 -0
  19. package/dist/es/models/IEntityStorageAuthenticationAdminServiceConstructorOptions.js +2 -0
  20. package/dist/es/models/IEntityStorageAuthenticationAdminServiceConstructorOptions.js.map +1 -0
  21. package/dist/es/models/IEntityStorageAuthenticationAuditServiceConfig.js +4 -0
  22. package/dist/es/models/IEntityStorageAuthenticationAuditServiceConfig.js.map +1 -0
  23. package/dist/es/models/IEntityStorageAuthenticationAuditServiceConstructorOptions.js +2 -0
  24. package/dist/es/models/IEntityStorageAuthenticationAuditServiceConstructorOptions.js.map +1 -0
  25. package/dist/es/models/IEntityStorageAuthenticationRateServiceConfig.js +2 -0
  26. package/dist/es/models/IEntityStorageAuthenticationRateServiceConfig.js.map +1 -0
  27. package/dist/es/models/IEntityStorageAuthenticationRateServiceConstructorOptions.js +2 -0
  28. package/dist/es/models/IEntityStorageAuthenticationRateServiceConstructorOptions.js.map +1 -0
  29. package/dist/es/models/IEntityStorageAuthenticationServiceConfig.js +2 -0
  30. package/dist/es/models/IEntityStorageAuthenticationServiceConfig.js.map +1 -0
  31. package/dist/es/models/IEntityStorageAuthenticationServiceConstructorOptions.js +2 -0
  32. package/dist/es/models/IEntityStorageAuthenticationServiceConstructorOptions.js.map +1 -0
  33. package/dist/es/processors/authHeaderProcessor.js +277 -0
  34. package/dist/es/processors/authHeaderProcessor.js.map +1 -0
  35. package/dist/es/restEntryPoints.js +27 -0
  36. package/dist/es/restEntryPoints.js.map +1 -0
  37. package/dist/es/routes/entityStorageAuthenticationAdminRoutes.js +367 -0
  38. package/dist/es/routes/entityStorageAuthenticationAdminRoutes.js.map +1 -0
  39. package/dist/es/routes/entityStorageAuthenticationAuditRoutes.js +343 -0
  40. package/dist/es/routes/entityStorageAuthenticationAuditRoutes.js.map +1 -0
  41. package/dist/es/routes/entityStorageAuthenticationRoutes.js +247 -0
  42. package/dist/es/routes/entityStorageAuthenticationRoutes.js.map +1 -0
  43. package/dist/es/schema.js +15 -0
  44. package/dist/es/schema.js.map +1 -0
  45. package/dist/es/services/entityStorageAuthenticationAdminService.js +323 -0
  46. package/dist/es/services/entityStorageAuthenticationAdminService.js.map +1 -0
  47. package/dist/es/services/entityStorageAuthenticationAuditService.js +240 -0
  48. package/dist/es/services/entityStorageAuthenticationAuditService.js.map +1 -0
  49. package/dist/es/services/entityStorageAuthenticationRateService.js +213 -0
  50. package/dist/es/services/entityStorageAuthenticationRateService.js.map +1 -0
  51. package/dist/es/services/entityStorageAuthenticationService.js +326 -0
  52. package/dist/es/services/entityStorageAuthenticationService.js.map +1 -0
  53. package/dist/es/utils/passwordHelper.js +58 -0
  54. package/dist/es/utils/passwordHelper.js.map +1 -0
  55. package/dist/es/utils/tokenHelper.js +142 -0
  56. package/dist/es/utils/tokenHelper.js.map +1 -0
  57. package/dist/types/entities/authenticationAuditEntry.d.ts +49 -0
  58. package/dist/types/entities/authenticationRateEntry.d.ts +17 -0
  59. package/dist/types/entities/authenticationUser.d.ts +33 -0
  60. package/dist/types/index.d.ts +26 -0
  61. package/dist/types/models/IAuthHeaderProcessorConfig.d.ts +39 -0
  62. package/dist/types/models/IAuthHeaderProcessorConstructorOptions.d.ts +25 -0
  63. package/dist/types/models/IAuthTokenContext.d.ts +34 -0
  64. package/dist/types/models/IEntityStorageAuthenticationAdminServiceConfig.d.ts +14 -0
  65. package/dist/types/models/IEntityStorageAuthenticationAdminServiceConstructorOptions.d.ts +20 -0
  66. package/dist/types/models/IEntityStorageAuthenticationAuditServiceConfig.d.ts +9 -0
  67. package/dist/types/models/IEntityStorageAuthenticationAuditServiceConstructorOptions.d.ts +15 -0
  68. package/dist/types/models/IEntityStorageAuthenticationRateServiceConfig.d.ts +10 -0
  69. package/dist/types/models/IEntityStorageAuthenticationRateServiceConstructorOptions.d.ts +25 -0
  70. package/dist/types/models/IEntityStorageAuthenticationServiceConfig.d.ts +36 -0
  71. package/dist/types/models/IEntityStorageAuthenticationServiceConstructorOptions.d.ts +35 -0
  72. package/dist/types/processors/authHeaderProcessor.d.ts +57 -0
  73. package/dist/types/restEntryPoints.d.ts +5 -0
  74. package/dist/types/routes/entityStorageAuthenticationAdminRoutes.d.ts +62 -0
  75. package/dist/types/routes/entityStorageAuthenticationAuditRoutes.d.ts +54 -0
  76. package/dist/types/routes/entityStorageAuthenticationRoutes.d.ts +45 -0
  77. package/dist/types/schema.d.ts +4 -0
  78. package/dist/types/services/entityStorageAuthenticationAdminService.d.ts +65 -0
  79. package/dist/types/services/entityStorageAuthenticationAuditService.d.ts +72 -0
  80. package/dist/types/services/entityStorageAuthenticationRateService.d.ts +60 -0
  81. package/dist/types/services/entityStorageAuthenticationService.d.ts +65 -0
  82. package/dist/types/utils/passwordHelper.d.ts +24 -0
  83. package/dist/types/utils/tokenHelper.d.ts +60 -0
  84. package/docs/changelog.md +0 -0
  85. package/docs/examples.md +178 -0
  86. package/docs/open-api/spec.json +2122 -0
  87. package/docs/reference/classes/AuthHeaderProcessor.md +193 -0
  88. package/docs/reference/classes/AuthenticationAuditEntry.md +101 -0
  89. package/docs/reference/classes/AuthenticationRateEntry.md +37 -0
  90. package/docs/reference/classes/AuthenticationUser.md +69 -0
  91. package/docs/reference/classes/EntityStorageAuthenticationAdminService.md +229 -0
  92. package/docs/reference/classes/EntityStorageAuthenticationAuditService.md +241 -0
  93. package/docs/reference/classes/EntityStorageAuthenticationRateService.md +227 -0
  94. package/docs/reference/classes/EntityStorageAuthenticationService.md +221 -0
  95. package/docs/reference/classes/PasswordHelper.md +74 -0
  96. package/docs/reference/classes/TokenHelper.md +205 -0
  97. package/docs/reference/functions/authenticationAdminCreateUser.md +37 -0
  98. package/docs/reference/functions/authenticationAdminGetUser.md +31 -0
  99. package/docs/reference/functions/authenticationAdminGetUserByIdentity.md +31 -0
  100. package/docs/reference/functions/authenticationAdminRemoveUser.md +31 -0
  101. package/docs/reference/functions/authenticationAdminUpdateUser.md +31 -0
  102. package/docs/reference/functions/authenticationAdminUpdateUserPassword.md +31 -0
  103. package/docs/reference/functions/authenticationAuditCreate.md +37 -0
  104. package/docs/reference/functions/authenticationAuditGet.md +31 -0
  105. package/docs/reference/functions/authenticationAuditQuery.md +31 -0
  106. package/docs/reference/functions/authenticationAuditRemove.md +31 -0
  107. package/docs/reference/functions/authenticationAuditUpdate.md +31 -0
  108. package/docs/reference/functions/authenticationLogin.md +31 -0
  109. package/docs/reference/functions/authenticationLogout.md +31 -0
  110. package/docs/reference/functions/authenticationRefreshToken.md +31 -0
  111. package/docs/reference/functions/authenticationUpdatePassword.md +31 -0
  112. package/docs/reference/functions/generateRestRoutesAuthentication.md +25 -0
  113. package/docs/reference/functions/generateRestRoutesAuthenticationAdmin.md +25 -0
  114. package/docs/reference/functions/generateRestRoutesAuthenticationAudit.md +25 -0
  115. package/docs/reference/functions/initSchema.md +9 -0
  116. package/docs/reference/index.md +57 -0
  117. package/docs/reference/interfaces/IAuthHeaderProcessorConfig.md +86 -0
  118. package/docs/reference/interfaces/IAuthHeaderProcessorConstructorOptions.md +53 -0
  119. package/docs/reference/interfaces/IAuthTokenContext.md +60 -0
  120. package/docs/reference/interfaces/IEntityStorageAuthenticationAdminServiceConfig.md +25 -0
  121. package/docs/reference/interfaces/IEntityStorageAuthenticationAdminServiceConstructorOptions.md +39 -0
  122. package/docs/reference/interfaces/IEntityStorageAuthenticationAuditServiceConfig.md +11 -0
  123. package/docs/reference/interfaces/IEntityStorageAuthenticationAuditServiceConstructorOptions.md +25 -0
  124. package/docs/reference/interfaces/IEntityStorageAuthenticationRateServiceConfig.md +17 -0
  125. package/docs/reference/interfaces/IEntityStorageAuthenticationRateServiceConstructorOptions.md +53 -0
  126. package/docs/reference/interfaces/IEntityStorageAuthenticationServiceConfig.md +87 -0
  127. package/docs/reference/interfaces/IEntityStorageAuthenticationServiceConstructorOptions.md +81 -0
  128. package/docs/reference/variables/restEntryPoints.md +5 -0
  129. package/docs/reference/variables/tagsAuthentication.md +5 -0
  130. package/docs/reference/variables/tagsAuthenticationAdmin.md +5 -0
  131. package/docs/reference/variables/tagsAuthenticationAudit.md +5 -0
  132. package/locales/en.json +52 -0
  133. package/package.json +64 -5
@@ -0,0 +1,31 @@
1
+ # Function: authenticationRefreshToken()
2
+
3
+ > **authenticationRefreshToken**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`IRefreshTokenResponse` & `IRestRouteResponseOptions`\>
4
+
5
+ Refresh the login token.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ `IRefreshTokenRequest`
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`IRefreshTokenResponse` & `IRestRouteResponseOptions`\>
30
+
31
+ The response object with additional http response properties.
@@ -0,0 +1,31 @@
1
+ # Function: authenticationUpdatePassword()
2
+
3
+ > **authenticationUpdatePassword**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse`\>
4
+
5
+ Update the user's password.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ `IUpdatePasswordRequest`
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`INoContentResponse`\>
30
+
31
+ The response object with additional http response properties.
@@ -0,0 +1,25 @@
1
+ # Function: generateRestRoutesAuthentication()
2
+
3
+ > **generateRestRoutesAuthentication**(`baseRouteName`, `componentName`): `IRestRoute`\<`any`, `any`\>[]
4
+
5
+ The REST routes for authentication.
6
+
7
+ ## Parameters
8
+
9
+ ### baseRouteName
10
+
11
+ `string`
12
+
13
+ Prefix to prepend to the paths.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes stored in the ComponentFactory.
20
+
21
+ ## Returns
22
+
23
+ `IRestRoute`\<`any`, `any`\>[]
24
+
25
+ The generated routes.
@@ -0,0 +1,25 @@
1
+ # Function: generateRestRoutesAuthenticationAdmin()
2
+
3
+ > **generateRestRoutesAuthenticationAdmin**(`baseRouteName`, `componentName`): `IRestRoute`\<`any`, `any`\>[]
4
+
5
+ The REST routes for authentication admin.
6
+
7
+ ## Parameters
8
+
9
+ ### baseRouteName
10
+
11
+ `string`
12
+
13
+ Prefix to prepend to the paths.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes stored in the ComponentFactory.
20
+
21
+ ## Returns
22
+
23
+ `IRestRoute`\<`any`, `any`\>[]
24
+
25
+ The generated routes.
@@ -0,0 +1,25 @@
1
+ # Function: generateRestRoutesAuthenticationAudit()
2
+
3
+ > **generateRestRoutesAuthenticationAudit**(`baseRouteName`, `componentName`): `IRestRoute`\<`any`, `any`\>[]
4
+
5
+ The REST routes for authentication audit.
6
+
7
+ ## Parameters
8
+
9
+ ### baseRouteName
10
+
11
+ `string`
12
+
13
+ Prefix to prepend to the paths.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes stored in the ComponentFactory.
20
+
21
+ ## Returns
22
+
23
+ `IRestRoute`\<`any`, `any`\>[]
24
+
25
+ The generated routes.
@@ -0,0 +1,9 @@
1
+ # Function: initSchema()
2
+
3
+ > **initSchema**(): `void`
4
+
5
+ Initialize the schema for the authentication service.
6
+
7
+ ## Returns
8
+
9
+ `void`
@@ -0,0 +1,57 @@
1
+ # @3sixty/api-auth-entity-storage-service
2
+
3
+ ## Classes
4
+
5
+ - [AuthenticationAuditEntry](classes/AuthenticationAuditEntry.md)
6
+ - [AuthenticationRateEntry](classes/AuthenticationRateEntry.md)
7
+ - [AuthenticationUser](classes/AuthenticationUser.md)
8
+ - [AuthHeaderProcessor](classes/AuthHeaderProcessor.md)
9
+ - [EntityStorageAuthenticationAdminService](classes/EntityStorageAuthenticationAdminService.md)
10
+ - [EntityStorageAuthenticationAuditService](classes/EntityStorageAuthenticationAuditService.md)
11
+ - [EntityStorageAuthenticationRateService](classes/EntityStorageAuthenticationRateService.md)
12
+ - [EntityStorageAuthenticationService](classes/EntityStorageAuthenticationService.md)
13
+ - [PasswordHelper](classes/PasswordHelper.md)
14
+ - [TokenHelper](classes/TokenHelper.md)
15
+
16
+ ## Interfaces
17
+
18
+ - [IAuthHeaderProcessorConfig](interfaces/IAuthHeaderProcessorConfig.md)
19
+ - [IAuthHeaderProcessorConstructorOptions](interfaces/IAuthHeaderProcessorConstructorOptions.md)
20
+ - [IAuthTokenContext](interfaces/IAuthTokenContext.md)
21
+ - [IEntityStorageAuthenticationAdminServiceConfig](interfaces/IEntityStorageAuthenticationAdminServiceConfig.md)
22
+ - [IEntityStorageAuthenticationAdminServiceConstructorOptions](interfaces/IEntityStorageAuthenticationAdminServiceConstructorOptions.md)
23
+ - [IEntityStorageAuthenticationAuditServiceConfig](interfaces/IEntityStorageAuthenticationAuditServiceConfig.md)
24
+ - [IEntityStorageAuthenticationAuditServiceConstructorOptions](interfaces/IEntityStorageAuthenticationAuditServiceConstructorOptions.md)
25
+ - [IEntityStorageAuthenticationRateServiceConfig](interfaces/IEntityStorageAuthenticationRateServiceConfig.md)
26
+ - [IEntityStorageAuthenticationRateServiceConstructorOptions](interfaces/IEntityStorageAuthenticationRateServiceConstructorOptions.md)
27
+ - [IEntityStorageAuthenticationServiceConfig](interfaces/IEntityStorageAuthenticationServiceConfig.md)
28
+ - [IEntityStorageAuthenticationServiceConstructorOptions](interfaces/IEntityStorageAuthenticationServiceConstructorOptions.md)
29
+
30
+ ## Variables
31
+
32
+ - [restEntryPoints](variables/restEntryPoints.md)
33
+ - [tagsAuthenticationAdmin](variables/tagsAuthenticationAdmin.md)
34
+ - [tagsAuthenticationAudit](variables/tagsAuthenticationAudit.md)
35
+ - [tagsAuthentication](variables/tagsAuthentication.md)
36
+
37
+ ## Functions
38
+
39
+ - [generateRestRoutesAuthenticationAdmin](functions/generateRestRoutesAuthenticationAdmin.md)
40
+ - [authenticationAdminCreateUser](functions/authenticationAdminCreateUser.md)
41
+ - [authenticationAdminUpdateUser](functions/authenticationAdminUpdateUser.md)
42
+ - [authenticationAdminUpdateUserPassword](functions/authenticationAdminUpdateUserPassword.md)
43
+ - [authenticationAdminGetUser](functions/authenticationAdminGetUser.md)
44
+ - [authenticationAdminGetUserByIdentity](functions/authenticationAdminGetUserByIdentity.md)
45
+ - [authenticationAdminRemoveUser](functions/authenticationAdminRemoveUser.md)
46
+ - [generateRestRoutesAuthenticationAudit](functions/generateRestRoutesAuthenticationAudit.md)
47
+ - [authenticationAuditCreate](functions/authenticationAuditCreate.md)
48
+ - [authenticationAuditGet](functions/authenticationAuditGet.md)
49
+ - [authenticationAuditUpdate](functions/authenticationAuditUpdate.md)
50
+ - [authenticationAuditRemove](functions/authenticationAuditRemove.md)
51
+ - [authenticationAuditQuery](functions/authenticationAuditQuery.md)
52
+ - [generateRestRoutesAuthentication](functions/generateRestRoutesAuthentication.md)
53
+ - [authenticationLogin](functions/authenticationLogin.md)
54
+ - [authenticationLogout](functions/authenticationLogout.md)
55
+ - [authenticationRefreshToken](functions/authenticationRefreshToken.md)
56
+ - [authenticationUpdatePassword](functions/authenticationUpdatePassword.md)
57
+ - [initSchema](functions/initSchema.md)
@@ -0,0 +1,86 @@
1
+ # Interface: IAuthHeaderProcessorConfig
2
+
3
+ Configuration for the authentication header processor
4
+
5
+ ## Properties
6
+
7
+ ### signingKeyName? {#signingkeyname}
8
+
9
+ > `optional` **signingKeyName?**: `string`
10
+
11
+ The name of the key to retrieve from the vault for signing JWT.
12
+
13
+ #### Default
14
+
15
+ ```ts
16
+ auth-signing
17
+ ```
18
+
19
+ ***
20
+
21
+ ### cookieName? {#cookiename}
22
+
23
+ > `optional` **cookieName?**: `string`
24
+
25
+ The name of the cookie to use for the token.
26
+
27
+ #### Default
28
+
29
+ ```ts
30
+ access_token
31
+ ```
32
+
33
+ ***
34
+
35
+ ### includeErrorStack? {#includeerrorstack}
36
+
37
+ > `optional` **includeErrorStack?**: `boolean`
38
+
39
+ Include the stack with errors.
40
+
41
+ ***
42
+
43
+ ### tokenCacheTtlMs? {#tokencachettlms}
44
+
45
+ > `optional` **tokenCacheTtlMs?**: `number`
46
+
47
+ The time in milliseconds a verified token is kept in the in-memory cache, counted from when it
48
+ was verified and not extended by use, set to 0 to disable caching. A hit skips the vault
49
+ signature check, the tenant lookup and the user lookup, so this is also the longest a password
50
+ change, a user removal or a signing key rotation can go unnoticed. An entry never outlives the
51
+ expiry claim of its own token either. The scopes a route requires are still checked for every
52
+ request.
53
+
54
+ #### Default
55
+
56
+ ```ts
57
+ 30000
58
+ ```
59
+
60
+ ***
61
+
62
+ ### tokenCacheCapacity? {#tokencachecapacity}
63
+
64
+ > `optional` **tokenCacheCapacity?**: `number`
65
+
66
+ The maximum number of verified tokens to hold in the in-memory cache.
67
+
68
+ #### Default
69
+
70
+ ```ts
71
+ undefined (LfuCache default)
72
+ ```
73
+
74
+ ***
75
+
76
+ ### tokenCacheMutexTimeoutMs? {#tokencachemutextimeoutms}
77
+
78
+ > `optional` **tokenCacheMutexTimeoutMs?**: `number`
79
+
80
+ Maximum time in milliseconds to wait for the token cache mutex during a cache population.
81
+
82
+ #### Default
83
+
84
+ ```ts
85
+ undefined (LfuCache default)
86
+ ```
@@ -0,0 +1,53 @@
1
+ # Interface: IAuthHeaderProcessorConstructorOptions
2
+
3
+ Options for the AuthHeaderProcessor constructor.
4
+
5
+ ## Properties
6
+
7
+ ### userEntityStorageType? {#userentitystoragetype}
8
+
9
+ > `optional` **userEntityStorageType?**: `string`
10
+
11
+ The entity storage for users.
12
+
13
+ #### Default
14
+
15
+ ```ts
16
+ authentication-user
17
+ ```
18
+
19
+ ***
20
+
21
+ ### vaultConnectorType? {#vaultconnectortype}
22
+
23
+ > `optional` **vaultConnectorType?**: `string`
24
+
25
+ The vault for the private keys.
26
+
27
+ #### Default
28
+
29
+ ```ts
30
+ vault
31
+ ```
32
+
33
+ ***
34
+
35
+ ### tenantAdminComponentType? {#tenantadmincomponenttype}
36
+
37
+ > `optional` **tenantAdminComponentType?**: `string`
38
+
39
+ The component to retrieve tenant information.
40
+
41
+ #### Default
42
+
43
+ ```ts
44
+ tenant-admin
45
+ ```
46
+
47
+ ***
48
+
49
+ ### config? {#config}
50
+
51
+ > `optional` **config?**: [`IAuthHeaderProcessorConfig`](IAuthHeaderProcessorConfig.md)
52
+
53
+ The configuration for the processor.
@@ -0,0 +1,60 @@
1
+ # Interface: IAuthTokenContext
2
+
3
+ The context resolved from an access token, everything a request needs that does not depend on
4
+ the route being called.
5
+
6
+ ## Properties
7
+
8
+ ### tenantId? {#tenantid}
9
+
10
+ > `optional` **tenantId?**: `string`
11
+
12
+ The tenant id from the token, if it carried one.
13
+
14
+ ***
15
+
16
+ ### tenantOrganizationId? {#tenantorganizationid}
17
+
18
+ > `optional` **tenantOrganizationId?**: `string`
19
+
20
+ The organization id of the tenant the token belongs to.
21
+
22
+ ***
23
+
24
+ ### tenantPublicOrigin? {#tenantpublicorigin}
25
+
26
+ > `optional` **tenantPublicOrigin?**: `string`
27
+
28
+ The public origin of the tenant the token belongs to.
29
+
30
+ ***
31
+
32
+ ### userIdentity? {#useridentity}
33
+
34
+ > `optional` **userIdentity?**: `string`
35
+
36
+ The identity of the verified user.
37
+
38
+ ***
39
+
40
+ ### userOrganization? {#userorganization}
41
+
42
+ > `optional` **userOrganization?**: `string`
43
+
44
+ The organization of the verified user.
45
+
46
+ ***
47
+
48
+ ### scope? {#scope}
49
+
50
+ > `optional` **scope?**: `string`
51
+
52
+ The comma separated scopes carried by the token.
53
+
54
+ ***
55
+
56
+ ### expires? {#expires}
57
+
58
+ > `optional` **expires?**: `number`
59
+
60
+ The expiry of the token in milliseconds since the epoch, if it carried one.
@@ -0,0 +1,25 @@
1
+ # Interface: IEntityStorageAuthenticationAdminServiceConfig
2
+
3
+ Configuration for the entity storage authentication admin service.
4
+
5
+ ## Properties
6
+
7
+ ### minPasswordLength? {#minpasswordlength}
8
+
9
+ > `optional` **minPasswordLength?**: `number`
10
+
11
+ The minimum password length.
12
+
13
+ #### Default
14
+
15
+ ```ts
16
+ 8
17
+ ```
18
+
19
+ ***
20
+
21
+ ### escalatedPrivilegeScope? {#escalatedprivilegescope}
22
+
23
+ > `optional` **escalatedPrivilegeScope?**: `string`
24
+
25
+ The scope value that grants escalated privilege to assign privileged roles. Defaults to "global-admin".
@@ -0,0 +1,39 @@
1
+ # Interface: IEntityStorageAuthenticationAdminServiceConstructorOptions
2
+
3
+ Options for the EntityStorageAuthenticationAdminService constructor.
4
+
5
+ ## Properties
6
+
7
+ ### userEntityStorageType? {#userentitystoragetype}
8
+
9
+ > `optional` **userEntityStorageType?**: `string`
10
+
11
+ The entity storage for the users.
12
+
13
+ #### Default
14
+
15
+ ```ts
16
+ authentication-user
17
+ ```
18
+
19
+ ***
20
+
21
+ ### authenticationAuditServiceType? {#authenticationauditservicetype}
22
+
23
+ > `optional` **authenticationAuditServiceType?**: `string`
24
+
25
+ The audit service.
26
+
27
+ #### Default
28
+
29
+ ```ts
30
+ authentication-audit
31
+ ```
32
+
33
+ ***
34
+
35
+ ### config? {#config}
36
+
37
+ > `optional` **config?**: [`IEntityStorageAuthenticationAdminServiceConfig`](IEntityStorageAuthenticationAdminServiceConfig.md)
38
+
39
+ The configuration for the authentication.
@@ -0,0 +1,11 @@
1
+ # Interface: IEntityStorageAuthenticationAuditServiceConfig
2
+
3
+ Config for the EntityStorageAuthenticationAuditService constructor.
4
+
5
+ ## Properties
6
+
7
+ ### ipHashSalt? {#iphashsalt}
8
+
9
+ > `optional` **ipHashSalt?**: `string`
10
+
11
+ The server-side salt for hashing IP addresses in audit logs, if configured.
@@ -0,0 +1,25 @@
1
+ # Interface: IEntityStorageAuthenticationAuditServiceConstructorOptions
2
+
3
+ Options for the EntityStorageAuthenticationAuditService constructor.
4
+
5
+ ## Properties
6
+
7
+ ### authenticationAuditEntryStorageType? {#authenticationauditentrystoragetype}
8
+
9
+ > `optional` **authenticationAuditEntryStorageType?**: `string`
10
+
11
+ The entity storage for the audit entries.
12
+
13
+ #### Default
14
+
15
+ ```ts
16
+ authentication-audit-entry
17
+ ```
18
+
19
+ ***
20
+
21
+ ### config? {#config}
22
+
23
+ > `optional` **config?**: [`IEntityStorageAuthenticationAuditServiceConfig`](IEntityStorageAuthenticationAuditServiceConfig.md)
24
+
25
+ The configuration for the authentication audit service.
@@ -0,0 +1,17 @@
1
+ # Interface: IEntityStorageAuthenticationRateServiceConfig
2
+
3
+ Configuration for the entity storage authentication rate service.
4
+
5
+ ## Properties
6
+
7
+ ### cleanupIntervalMinutes? {#cleanupintervalminutes}
8
+
9
+ > `optional` **cleanupIntervalMinutes?**: `number`
10
+
11
+ Interval between cleanup runs in minutes.
12
+
13
+ #### Default
14
+
15
+ ```ts
16
+ 5
17
+ ```
@@ -0,0 +1,53 @@
1
+ # Interface: IEntityStorageAuthenticationRateServiceConstructorOptions
2
+
3
+ Options for the EntityStorageAuthenticationRateService constructor.
4
+
5
+ ## Properties
6
+
7
+ ### authenticationRateEntryStorageType? {#authenticationrateentrystoragetype}
8
+
9
+ > `optional` **authenticationRateEntryStorageType?**: `string`
10
+
11
+ The entity storage for authentication rate entries.
12
+
13
+ #### Default
14
+
15
+ ```ts
16
+ authentication-rate-entry
17
+ ```
18
+
19
+ ***
20
+
21
+ ### taskSchedulerComponentType? {#taskschedulercomponenttype}
22
+
23
+ > `optional` **taskSchedulerComponentType?**: `string`
24
+
25
+ The task scheduler component type.
26
+
27
+ #### Default
28
+
29
+ ```ts
30
+ task-scheduler
31
+ ```
32
+
33
+ ***
34
+
35
+ ### platformComponentType? {#platformcomponenttype}
36
+
37
+ > `optional` **platformComponentType?**: `string`
38
+
39
+ The platform component type, used to run the periodic cleanup per tenant.
40
+
41
+ #### Default
42
+
43
+ ```ts
44
+ platform
45
+ ```
46
+
47
+ ***
48
+
49
+ ### config? {#config}
50
+
51
+ > `optional` **config?**: [`IEntityStorageAuthenticationRateServiceConfig`](IEntityStorageAuthenticationRateServiceConfig.md)
52
+
53
+ The configuration for the authentication rate service.
@@ -0,0 +1,87 @@
1
+ # Interface: IEntityStorageAuthenticationServiceConfig
2
+
3
+ Configuration for the entity storage authentication service.
4
+
5
+ ## Properties
6
+
7
+ ### signingKeyName? {#signingkeyname}
8
+
9
+ > `optional` **signingKeyName?**: `string`
10
+
11
+ The name of the key to retrieve from the vault for signing JWT.
12
+
13
+ #### Default
14
+
15
+ ```ts
16
+ auth-signing
17
+ ```
18
+
19
+ ***
20
+
21
+ ### defaultTtlMinutes? {#defaultttlminutes}
22
+
23
+ > `optional` **defaultTtlMinutes?**: `number`
24
+
25
+ The default time to live for the JWT.
26
+
27
+ #### Default
28
+
29
+ ```ts
30
+ 60
31
+ ```
32
+
33
+ ***
34
+
35
+ ### minPasswordLength? {#minpasswordlength}
36
+
37
+ > `optional` **minPasswordLength?**: `number`
38
+
39
+ The minimum password length for new password validation.
40
+
41
+ #### Default
42
+
43
+ ```ts
44
+ 8
45
+ ```
46
+
47
+ ***
48
+
49
+ ### loginRateLimit? {#loginratelimit}
50
+
51
+ > `optional` **loginRateLimit?**: `IAuthenticationRateActionConfig`
52
+
53
+ Optional override for login failure rate limit.
54
+
55
+ #### Default
56
+
57
+ ```ts
58
+ { maxAttempts: 5, windowMinutes: 15 }
59
+ ```
60
+
61
+ ***
62
+
63
+ ### passwordChangeRateLimit? {#passwordchangeratelimit}
64
+
65
+ > `optional` **passwordChangeRateLimit?**: `IAuthenticationRateActionConfig`
66
+
67
+ Optional override for password change rate limit.
68
+
69
+ #### Default
70
+
71
+ ```ts
72
+ { maxAttempts: 5, windowMinutes: 15 }
73
+ ```
74
+
75
+ ***
76
+
77
+ ### tokenRefreshRateLimit? {#tokenrefreshratelimit}
78
+
79
+ > `optional` **tokenRefreshRateLimit?**: `IAuthenticationRateActionConfig`
80
+
81
+ Optional override for token refresh rate limit.
82
+
83
+ #### Default
84
+
85
+ ```ts
86
+ { maxAttempts: 30, windowMinutes: 60 }
87
+ ```