@3sixty/api-auth-entity-storage-service 0.0.0-stage → 0.20.0-next.1

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 (96) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +24 -2
  3. package/dist/es/entities/authenticationUser.js +61 -0
  4. package/dist/es/entities/authenticationUser.js.map +1 -0
  5. package/dist/es/entities/authenticationUserV0.js +69 -0
  6. package/dist/es/entities/authenticationUserV0.js.map +1 -0
  7. package/dist/es/index.js +21 -0
  8. package/dist/es/index.js.map +1 -0
  9. package/dist/es/models/IAuthHeaderProcessorConfig.js +4 -0
  10. package/dist/es/models/IAuthHeaderProcessorConfig.js.map +1 -0
  11. package/dist/es/models/IAuthHeaderProcessorConstructorOptions.js +2 -0
  12. package/dist/es/models/IAuthHeaderProcessorConstructorOptions.js.map +1 -0
  13. package/dist/es/models/IAuthTokenContext.js +4 -0
  14. package/dist/es/models/IAuthTokenContext.js.map +1 -0
  15. package/dist/es/models/IEntityStorageAuthenticationAdminServiceConfig.js +4 -0
  16. package/dist/es/models/IEntityStorageAuthenticationAdminServiceConfig.js.map +1 -0
  17. package/dist/es/models/IEntityStorageAuthenticationAdminServiceConstructorOptions.js +2 -0
  18. package/dist/es/models/IEntityStorageAuthenticationAdminServiceConstructorOptions.js.map +1 -0
  19. package/dist/es/models/IEntityStorageAuthenticationServiceConfig.js +2 -0
  20. package/dist/es/models/IEntityStorageAuthenticationServiceConfig.js.map +1 -0
  21. package/dist/es/models/IEntityStorageAuthenticationServiceConstructorOptions.js +2 -0
  22. package/dist/es/models/IEntityStorageAuthenticationServiceConstructorOptions.js.map +1 -0
  23. package/dist/es/processors/authHeaderProcessor.js +272 -0
  24. package/dist/es/processors/authHeaderProcessor.js.map +1 -0
  25. package/dist/es/restEntryPoints.js +20 -0
  26. package/dist/es/restEntryPoints.js.map +1 -0
  27. package/dist/es/routes/entityStorageAuthenticationAdminRoutes.js +375 -0
  28. package/dist/es/routes/entityStorageAuthenticationAdminRoutes.js.map +1 -0
  29. package/dist/es/routes/entityStorageAuthenticationRoutes.js +291 -0
  30. package/dist/es/routes/entityStorageAuthenticationRoutes.js.map +1 -0
  31. package/dist/es/schema.js +13 -0
  32. package/dist/es/schema.js.map +1 -0
  33. package/dist/es/services/entityStorageAuthenticationAdminService.js +324 -0
  34. package/dist/es/services/entityStorageAuthenticationAdminService.js.map +1 -0
  35. package/dist/es/services/entityStorageAuthenticationService.js +338 -0
  36. package/dist/es/services/entityStorageAuthenticationService.js.map +1 -0
  37. package/dist/es/utils/passwordHelper.js +60 -0
  38. package/dist/es/utils/passwordHelper.js.map +1 -0
  39. package/dist/es/utils/tokenHelper.js +121 -0
  40. package/dist/es/utils/tokenHelper.js.map +1 -0
  41. package/dist/types/entities/authenticationUser.d.ts +29 -0
  42. package/dist/types/entities/authenticationUserV0.d.ts +33 -0
  43. package/dist/types/index.d.ts +18 -0
  44. package/dist/types/models/IAuthHeaderProcessorConfig.d.ts +38 -0
  45. package/dist/types/models/IAuthHeaderProcessorConstructorOptions.d.ts +25 -0
  46. package/dist/types/models/IAuthTokenContext.d.ts +30 -0
  47. package/dist/types/models/IEntityStorageAuthenticationAdminServiceConfig.d.ts +25 -0
  48. package/dist/types/models/IEntityStorageAuthenticationAdminServiceConstructorOptions.d.ts +25 -0
  49. package/dist/types/models/IEntityStorageAuthenticationServiceConfig.d.ts +41 -0
  50. package/dist/types/models/IEntityStorageAuthenticationServiceConstructorOptions.d.ts +35 -0
  51. package/dist/types/processors/authHeaderProcessor.d.ts +57 -0
  52. package/dist/types/restEntryPoints.d.ts +5 -0
  53. package/dist/types/routes/entityStorageAuthenticationAdminRoutes.d.ts +62 -0
  54. package/dist/types/routes/entityStorageAuthenticationRoutes.d.ts +53 -0
  55. package/dist/types/schema.d.ts +4 -0
  56. package/dist/types/services/entityStorageAuthenticationAdminService.d.ts +69 -0
  57. package/dist/types/services/entityStorageAuthenticationService.d.ts +70 -0
  58. package/dist/types/utils/passwordHelper.d.ts +27 -0
  59. package/dist/types/utils/tokenHelper.d.ts +51 -0
  60. package/docs/changelog.md +19 -0
  61. package/docs/examples.md +94 -0
  62. package/docs/open-api/spec.json +1344 -0
  63. package/docs/reference/classes/AuthHeaderProcessor.md +197 -0
  64. package/docs/reference/classes/AuthenticationUser.md +61 -0
  65. package/docs/reference/classes/AuthenticationUserV0.md +69 -0
  66. package/docs/reference/classes/EntityStorageAuthenticationAdminService.md +237 -0
  67. package/docs/reference/classes/EntityStorageAuthenticationService.md +239 -0
  68. package/docs/reference/classes/PasswordHelper.md +74 -0
  69. package/docs/reference/classes/TokenHelper.md +163 -0
  70. package/docs/reference/functions/authenticationAdminCreateUser.md +37 -0
  71. package/docs/reference/functions/authenticationAdminGetUser.md +31 -0
  72. package/docs/reference/functions/authenticationAdminGetUserByIdentity.md +31 -0
  73. package/docs/reference/functions/authenticationAdminRemoveUser.md +31 -0
  74. package/docs/reference/functions/authenticationAdminUpdateUser.md +31 -0
  75. package/docs/reference/functions/authenticationAdminUpdateUserPassword.md +31 -0
  76. package/docs/reference/functions/authenticationLogin.md +31 -0
  77. package/docs/reference/functions/authenticationLogout.md +31 -0
  78. package/docs/reference/functions/authenticationPasswordPolicy.md +31 -0
  79. package/docs/reference/functions/authenticationRefreshToken.md +31 -0
  80. package/docs/reference/functions/authenticationUpdatePassword.md +31 -0
  81. package/docs/reference/functions/generateRestRoutesAuthentication.md +25 -0
  82. package/docs/reference/functions/generateRestRoutesAuthenticationAdmin.md +25 -0
  83. package/docs/reference/functions/initSchema.md +9 -0
  84. package/docs/reference/index.md +44 -0
  85. package/docs/reference/interfaces/IAuthHeaderProcessorConfig.md +85 -0
  86. package/docs/reference/interfaces/IAuthHeaderProcessorConstructorOptions.md +53 -0
  87. package/docs/reference/interfaces/IAuthTokenContext.md +52 -0
  88. package/docs/reference/interfaces/IEntityStorageAuthenticationAdminServiceConfig.md +59 -0
  89. package/docs/reference/interfaces/IEntityStorageAuthenticationAdminServiceConstructorOptions.md +53 -0
  90. package/docs/reference/interfaces/IEntityStorageAuthenticationServiceConfig.md +101 -0
  91. package/docs/reference/interfaces/IEntityStorageAuthenticationServiceConstructorOptions.md +81 -0
  92. package/docs/reference/variables/restEntryPoints.md +5 -0
  93. package/docs/reference/variables/tagsAuthentication.md +5 -0
  94. package/docs/reference/variables/tagsAuthenticationAdmin.md +5 -0
  95. package/locales/en.json +37 -0
  96. package/package.json +63 -5
@@ -0,0 +1,31 @@
1
+ # Function: authenticationLogout()
2
+
3
+ > **authenticationLogout**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse` & `IRestRouteResponseOptions`\>
4
+
5
+ Logout from the server.
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
+ `ILogoutRequest`
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`INoContentResponse` & `IRestRouteResponseOptions`\>
30
+
31
+ The response object with additional http response properties.
@@ -0,0 +1,31 @@
1
+ # Function: authenticationPasswordPolicy()
2
+
3
+ > **authenticationPasswordPolicy**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`IPasswordPolicyResponse` & `IRestRouteResponseOptions`\>
4
+
5
+ Get the password policy.
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
+ `INoContentRequest`
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`IPasswordPolicyResponse` & `IRestRouteResponseOptions`\>
30
+
31
+ The response object with additional http response properties.
@@ -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,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,44 @@
1
+ # @3sixty/api-auth-entity-storage-service
2
+
3
+ ## Classes
4
+
5
+ - [AuthenticationUser](classes/AuthenticationUser.md)
6
+ - [AuthenticationUserV0](classes/AuthenticationUserV0.md)
7
+ - [AuthHeaderProcessor](classes/AuthHeaderProcessor.md)
8
+ - [EntityStorageAuthenticationAdminService](classes/EntityStorageAuthenticationAdminService.md)
9
+ - [EntityStorageAuthenticationService](classes/EntityStorageAuthenticationService.md)
10
+ - [PasswordHelper](classes/PasswordHelper.md)
11
+ - [TokenHelper](classes/TokenHelper.md)
12
+
13
+ ## Interfaces
14
+
15
+ - [IAuthHeaderProcessorConfig](interfaces/IAuthHeaderProcessorConfig.md)
16
+ - [IAuthHeaderProcessorConstructorOptions](interfaces/IAuthHeaderProcessorConstructorOptions.md)
17
+ - [IAuthTokenContext](interfaces/IAuthTokenContext.md)
18
+ - [IEntityStorageAuthenticationAdminServiceConfig](interfaces/IEntityStorageAuthenticationAdminServiceConfig.md)
19
+ - [IEntityStorageAuthenticationAdminServiceConstructorOptions](interfaces/IEntityStorageAuthenticationAdminServiceConstructorOptions.md)
20
+ - [IEntityStorageAuthenticationServiceConfig](interfaces/IEntityStorageAuthenticationServiceConfig.md)
21
+ - [IEntityStorageAuthenticationServiceConstructorOptions](interfaces/IEntityStorageAuthenticationServiceConstructorOptions.md)
22
+
23
+ ## Variables
24
+
25
+ - [restEntryPoints](variables/restEntryPoints.md)
26
+ - [tagsAuthenticationAdmin](variables/tagsAuthenticationAdmin.md)
27
+ - [tagsAuthentication](variables/tagsAuthentication.md)
28
+
29
+ ## Functions
30
+
31
+ - [generateRestRoutesAuthenticationAdmin](functions/generateRestRoutesAuthenticationAdmin.md)
32
+ - [authenticationAdminCreateUser](functions/authenticationAdminCreateUser.md)
33
+ - [authenticationAdminUpdateUser](functions/authenticationAdminUpdateUser.md)
34
+ - [authenticationAdminUpdateUserPassword](functions/authenticationAdminUpdateUserPassword.md)
35
+ - [authenticationAdminGetUser](functions/authenticationAdminGetUser.md)
36
+ - [authenticationAdminGetUserByIdentity](functions/authenticationAdminGetUserByIdentity.md)
37
+ - [authenticationAdminRemoveUser](functions/authenticationAdminRemoveUser.md)
38
+ - [generateRestRoutesAuthentication](functions/generateRestRoutesAuthentication.md)
39
+ - [authenticationLogin](functions/authenticationLogin.md)
40
+ - [authenticationLogout](functions/authenticationLogout.md)
41
+ - [authenticationRefreshToken](functions/authenticationRefreshToken.md)
42
+ - [authenticationUpdatePassword](functions/authenticationUpdatePassword.md)
43
+ - [authenticationPasswordPolicy](functions/authenticationPasswordPolicy.md)
44
+ - [initSchema](functions/initSchema.md)
@@ -0,0 +1,85 @@
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.
52
+
53
+ #### Default
54
+
55
+ ```ts
56
+ 30000
57
+ ```
58
+
59
+ ***
60
+
61
+ ### tokenCacheCapacity? {#tokencachecapacity}
62
+
63
+ > `optional` **tokenCacheCapacity?**: `number`
64
+
65
+ The maximum number of verified tokens to hold in the in-memory cache.
66
+
67
+ #### Default
68
+
69
+ ```ts
70
+ undefined (LfuCache default)
71
+ ```
72
+
73
+ ***
74
+
75
+ ### tokenCacheMutexTimeoutMs? {#tokencachemutextimeoutms}
76
+
77
+ > `optional` **tokenCacheMutexTimeoutMs?**: `number`
78
+
79
+ Maximum time in milliseconds to wait for the token cache mutex during a cache population.
80
+
81
+ #### Default
82
+
83
+ ```ts
84
+ undefined (LfuCache default)
85
+ ```
@@ -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,52 @@
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
+ ### expires? {#expires}
49
+
50
+ > `optional` **expires?**: `number`
51
+
52
+ The expiry of the token in milliseconds since the epoch, if it carried one.
@@ -0,0 +1,59 @@
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
+ 15
17
+ ```
18
+
19
+ ***
20
+
21
+ ### maxPasswordLength? {#maxpasswordlength}
22
+
23
+ > `optional` **maxPasswordLength?**: `number`
24
+
25
+ The maximum password length.
26
+
27
+ #### Default
28
+
29
+ ```ts
30
+ 128
31
+ ```
32
+
33
+ ***
34
+
35
+ ### escalatedPrivilegeRole? {#escalatedprivilegerole}
36
+
37
+ > `optional` **escalatedPrivilegeRole?**: `string`
38
+
39
+ The role that grants escalated privilege, only callers holding it can modify accounts that hold it.
40
+
41
+ #### Default
42
+
43
+ ```ts
44
+ global-admin
45
+ ```
46
+
47
+ ***
48
+
49
+ ### authorizationModelId? {#authorizationmodelid}
50
+
51
+ > `optional` **authorizationModelId?**: `string`
52
+
53
+ The authorization model ID used to look up roles.
54
+
55
+ #### Default
56
+
57
+ ```ts
58
+ system
59
+ ```
@@ -0,0 +1,53 @@
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 component.
26
+
27
+ #### Default
28
+
29
+ ```ts
30
+ authentication-audit
31
+ ```
32
+
33
+ ***
34
+
35
+ ### authorizationComponentType? {#authorizationcomponenttype}
36
+
37
+ > `optional` **authorizationComponentType?**: `string`
38
+
39
+ The authorization component used to guard accounts with escalated privilege.
40
+
41
+ #### Default
42
+
43
+ ```ts
44
+ authorization
45
+ ```
46
+
47
+ ***
48
+
49
+ ### config? {#config}
50
+
51
+ > `optional` **config?**: [`IEntityStorageAuthenticationAdminServiceConfig`](IEntityStorageAuthenticationAdminServiceConfig.md)
52
+
53
+ The configuration for the authentication.
@@ -0,0 +1,101 @@
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
+ 15
45
+ ```
46
+
47
+ ***
48
+
49
+ ### maxPasswordLength? {#maxpasswordlength}
50
+
51
+ > `optional` **maxPasswordLength?**: `number`
52
+
53
+ The maximum password length for new password validation.
54
+
55
+ #### Default
56
+
57
+ ```ts
58
+ 128
59
+ ```
60
+
61
+ ***
62
+
63
+ ### loginRateLimit? {#loginratelimit}
64
+
65
+ > `optional` **loginRateLimit?**: `IAuthenticationRateActionConfig`
66
+
67
+ Optional override for login failure rate limit.
68
+
69
+ #### Default
70
+
71
+ ```ts
72
+ { maxAttempts: 5, windowMinutes: 15 }
73
+ ```
74
+
75
+ ***
76
+
77
+ ### passwordChangeRateLimit? {#passwordchangeratelimit}
78
+
79
+ > `optional` **passwordChangeRateLimit?**: `IAuthenticationRateActionConfig`
80
+
81
+ Optional override for password change rate limit.
82
+
83
+ #### Default
84
+
85
+ ```ts
86
+ { maxAttempts: 5, windowMinutes: 15 }
87
+ ```
88
+
89
+ ***
90
+
91
+ ### tokenRefreshRateLimit? {#tokenrefreshratelimit}
92
+
93
+ > `optional` **tokenRefreshRateLimit?**: `IAuthenticationRateActionConfig`
94
+
95
+ Optional override for token refresh rate limit.
96
+
97
+ #### Default
98
+
99
+ ```ts
100
+ { maxAttempts: 30, windowMinutes: 60 }
101
+ ```