@3sixty/api-auth-entity-storage-models 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 (127) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +24 -2
  3. package/dist/es/index.js +32 -0
  4. package/dist/es/index.js.map +1 -0
  5. package/dist/es/models/IAuthenticationAdminComponent.js +2 -0
  6. package/dist/es/models/IAuthenticationAdminComponent.js.map +1 -0
  7. package/dist/es/models/IAuthenticationAuditComponent.js +2 -0
  8. package/dist/es/models/IAuthenticationAuditComponent.js.map +1 -0
  9. package/dist/es/models/IAuthenticationAuditEntry.js +2 -0
  10. package/dist/es/models/IAuthenticationAuditEntry.js.map +1 -0
  11. package/dist/es/models/IAuthenticationComponent.js +2 -0
  12. package/dist/es/models/IAuthenticationComponent.js.map +1 -0
  13. package/dist/es/models/IAuthenticationRateActionConfig.js +4 -0
  14. package/dist/es/models/IAuthenticationRateActionConfig.js.map +1 -0
  15. package/dist/es/models/IAuthenticationRateComponent.js +2 -0
  16. package/dist/es/models/IAuthenticationRateComponent.js.map +1 -0
  17. package/dist/es/models/IAuthenticationUser.js +4 -0
  18. package/dist/es/models/IAuthenticationUser.js.map +1 -0
  19. package/dist/es/models/IAuthenticationUserSecure.js +2 -0
  20. package/dist/es/models/IAuthenticationUserSecure.js.map +1 -0
  21. package/dist/es/models/api/IAdminUserCreateRequest.js +2 -0
  22. package/dist/es/models/api/IAdminUserCreateRequest.js.map +1 -0
  23. package/dist/es/models/api/IAdminUserGetByIdentityRequest.js +4 -0
  24. package/dist/es/models/api/IAdminUserGetByIdentityRequest.js.map +1 -0
  25. package/dist/es/models/api/IAdminUserGetRequest.js +4 -0
  26. package/dist/es/models/api/IAdminUserGetRequest.js.map +1 -0
  27. package/dist/es/models/api/IAdminUserGetResponse.js +2 -0
  28. package/dist/es/models/api/IAdminUserGetResponse.js.map +1 -0
  29. package/dist/es/models/api/IAdminUserRemoveRequest.js +4 -0
  30. package/dist/es/models/api/IAdminUserRemoveRequest.js.map +1 -0
  31. package/dist/es/models/api/IAdminUserUpdatePasswordRequest.js +4 -0
  32. package/dist/es/models/api/IAdminUserUpdatePasswordRequest.js.map +1 -0
  33. package/dist/es/models/api/IAdminUserUpdateRequest.js +2 -0
  34. package/dist/es/models/api/IAdminUserUpdateRequest.js.map +1 -0
  35. package/dist/es/models/api/IAuditCreateRequest.js +2 -0
  36. package/dist/es/models/api/IAuditCreateRequest.js.map +1 -0
  37. package/dist/es/models/api/IAuditGetRequest.js +4 -0
  38. package/dist/es/models/api/IAuditGetRequest.js.map +1 -0
  39. package/dist/es/models/api/IAuditGetResponse.js +2 -0
  40. package/dist/es/models/api/IAuditGetResponse.js.map +1 -0
  41. package/dist/es/models/api/IAuditQueryRequest.js +2 -0
  42. package/dist/es/models/api/IAuditQueryRequest.js.map +1 -0
  43. package/dist/es/models/api/IAuditQueryResponse.js +2 -0
  44. package/dist/es/models/api/IAuditQueryResponse.js.map +1 -0
  45. package/dist/es/models/api/IAuditRemoveRequest.js +4 -0
  46. package/dist/es/models/api/IAuditRemoveRequest.js.map +1 -0
  47. package/dist/es/models/api/IAuditUpdateRequest.js +2 -0
  48. package/dist/es/models/api/IAuditUpdateRequest.js.map +1 -0
  49. package/dist/es/models/api/ILoginRequest.js +4 -0
  50. package/dist/es/models/api/ILoginRequest.js.map +1 -0
  51. package/dist/es/models/api/ILoginResponse.js +2 -0
  52. package/dist/es/models/api/ILoginResponse.js.map +1 -0
  53. package/dist/es/models/api/ILogoutRequest.js +4 -0
  54. package/dist/es/models/api/ILogoutRequest.js.map +1 -0
  55. package/dist/es/models/api/IRefreshTokenRequest.js +4 -0
  56. package/dist/es/models/api/IRefreshTokenRequest.js.map +1 -0
  57. package/dist/es/models/api/IRefreshTokenResponse.js +2 -0
  58. package/dist/es/models/api/IRefreshTokenResponse.js.map +1 -0
  59. package/dist/es/models/api/IUpdatePasswordRequest.js +4 -0
  60. package/dist/es/models/api/IUpdatePasswordRequest.js.map +1 -0
  61. package/dist/es/models/authAuditEvent.js +49 -0
  62. package/dist/es/models/authAuditEvent.js.map +1 -0
  63. package/dist/types/index.d.ts +29 -0
  64. package/dist/types/models/IAuthenticationAdminComponent.d.ts +47 -0
  65. package/dist/types/models/IAuthenticationAuditComponent.d.ts +59 -0
  66. package/dist/types/models/IAuthenticationAuditEntry.d.ts +50 -0
  67. package/dist/types/models/IAuthenticationComponent.d.ts +38 -0
  68. package/dist/types/models/IAuthenticationRateActionConfig.d.ts +13 -0
  69. package/dist/types/models/IAuthenticationRateComponent.d.ts +46 -0
  70. package/dist/types/models/IAuthenticationUser.d.ts +21 -0
  71. package/dist/types/models/IAuthenticationUserSecure.d.ts +18 -0
  72. package/dist/types/models/api/IAdminUserCreateRequest.d.ts +12 -0
  73. package/dist/types/models/api/IAdminUserGetByIdentityRequest.d.ts +14 -0
  74. package/dist/types/models/api/IAdminUserGetRequest.d.ts +14 -0
  75. package/dist/types/models/api/IAdminUserGetResponse.d.ts +10 -0
  76. package/dist/types/models/api/IAdminUserRemoveRequest.d.ts +14 -0
  77. package/dist/types/models/api/IAdminUserUpdatePasswordRequest.d.ts +27 -0
  78. package/dist/types/models/api/IAdminUserUpdateRequest.d.ts +19 -0
  79. package/dist/types/models/api/IAuditCreateRequest.d.ts +10 -0
  80. package/dist/types/models/api/IAuditGetRequest.d.ts +14 -0
  81. package/dist/types/models/api/IAuditGetResponse.d.ts +10 -0
  82. package/dist/types/models/api/IAuditQueryRequest.d.ts +47 -0
  83. package/dist/types/models/api/IAuditQueryResponse.d.ts +19 -0
  84. package/dist/types/models/api/IAuditRemoveRequest.d.ts +14 -0
  85. package/dist/types/models/api/IAuditUpdateRequest.d.ts +19 -0
  86. package/dist/types/models/api/ILoginRequest.d.ts +18 -0
  87. package/dist/types/models/api/ILoginResponse.d.ts +24 -0
  88. package/dist/types/models/api/ILogoutRequest.d.ts +14 -0
  89. package/dist/types/models/api/IRefreshTokenRequest.d.ts +14 -0
  90. package/dist/types/models/api/IRefreshTokenResponse.d.ts +24 -0
  91. package/dist/types/models/api/IUpdatePasswordRequest.d.ts +18 -0
  92. package/dist/types/models/authAuditEvent.d.ts +49 -0
  93. package/docs/changelog.md +0 -0
  94. package/docs/examples.md +80 -0
  95. package/docs/reference/index.md +40 -0
  96. package/docs/reference/interfaces/IAdminUserCreateRequest.md +17 -0
  97. package/docs/reference/interfaces/IAdminUserGetByIdentityRequest.md +17 -0
  98. package/docs/reference/interfaces/IAdminUserGetRequest.md +17 -0
  99. package/docs/reference/interfaces/IAdminUserGetResponse.md +11 -0
  100. package/docs/reference/interfaces/IAdminUserRemoveRequest.md +17 -0
  101. package/docs/reference/interfaces/IAdminUserUpdatePasswordRequest.md +37 -0
  102. package/docs/reference/interfaces/IAdminUserUpdateRequest.md +25 -0
  103. package/docs/reference/interfaces/IAuditCreateRequest.md +11 -0
  104. package/docs/reference/interfaces/IAuditGetRequest.md +17 -0
  105. package/docs/reference/interfaces/IAuditGetResponse.md +11 -0
  106. package/docs/reference/interfaces/IAuditQueryRequest.md +65 -0
  107. package/docs/reference/interfaces/IAuditQueryResponse.md +23 -0
  108. package/docs/reference/interfaces/IAuditRemoveRequest.md +17 -0
  109. package/docs/reference/interfaces/IAuditUpdateRequest.md +25 -0
  110. package/docs/reference/interfaces/IAuthenticationAdminComponent.md +151 -0
  111. package/docs/reference/interfaces/IAuthenticationAuditComponent.md +175 -0
  112. package/docs/reference/interfaces/IAuthenticationAuditEntry.md +91 -0
  113. package/docs/reference/interfaces/IAuthenticationComponent.md +107 -0
  114. package/docs/reference/interfaces/IAuthenticationRateActionConfig.md +19 -0
  115. package/docs/reference/interfaces/IAuthenticationRateComponent.md +165 -0
  116. package/docs/reference/interfaces/IAuthenticationUser.md +39 -0
  117. package/docs/reference/interfaces/IAuthenticationUserSecure.md +79 -0
  118. package/docs/reference/interfaces/ILoginRequest.md +23 -0
  119. package/docs/reference/interfaces/ILoginResponse.md +31 -0
  120. package/docs/reference/interfaces/ILogoutRequest.md +17 -0
  121. package/docs/reference/interfaces/IRefreshTokenRequest.md +17 -0
  122. package/docs/reference/interfaces/IRefreshTokenResponse.md +31 -0
  123. package/docs/reference/interfaces/IUpdatePasswordRequest.md +23 -0
  124. package/docs/reference/type-aliases/AuthAuditEvent.md +5 -0
  125. package/docs/reference/variables/AuthAuditEvent.md +67 -0
  126. package/locales/en.json +1 -0
  127. package/package.json +54 -5
@@ -0,0 +1,151 @@
1
+ # Interface: IAuthenticationAdminComponent
2
+
3
+ Contract definition for authentication admin component.
4
+
5
+ ## Extends
6
+
7
+ - `IComponent`
8
+
9
+ ## Methods
10
+
11
+ ### create() {#create}
12
+
13
+ > **create**(`user`): `Promise`\<`void`\>
14
+
15
+ Create a login for the user.
16
+
17
+ #### Parameters
18
+
19
+ ##### user
20
+
21
+ [`IAuthenticationUser`](IAuthenticationUser.md) & `object`
22
+
23
+ The user to create.
24
+
25
+ #### Returns
26
+
27
+ `Promise`\<`void`\>
28
+
29
+ A promise that resolves when the user account has been created.
30
+
31
+ ***
32
+
33
+ ### update() {#update}
34
+
35
+ > **update**(`user`): `Promise`\<`void`\>
36
+
37
+ Update a login for the user.
38
+
39
+ #### Parameters
40
+
41
+ ##### user
42
+
43
+ `Partial`\<[`IAuthenticationUser`](IAuthenticationUser.md)\>
44
+
45
+ The user to update.
46
+
47
+ #### Returns
48
+
49
+ `Promise`\<`void`\>
50
+
51
+ A promise that resolves when the user account has been updated.
52
+
53
+ ***
54
+
55
+ ### get() {#get}
56
+
57
+ > **get**(`email`): `Promise`\<[`IAuthenticationUser`](IAuthenticationUser.md)\>
58
+
59
+ Get a user by email.
60
+
61
+ #### Parameters
62
+
63
+ ##### email
64
+
65
+ `string`
66
+
67
+ The email address of the user to get.
68
+
69
+ #### Returns
70
+
71
+ `Promise`\<[`IAuthenticationUser`](IAuthenticationUser.md)\>
72
+
73
+ The user details.
74
+
75
+ ***
76
+
77
+ ### getByIdentity() {#getbyidentity}
78
+
79
+ > **getByIdentity**(`identity`): `Promise`\<[`IAuthenticationUser`](IAuthenticationUser.md)\>
80
+
81
+ Get a user by identity.
82
+
83
+ #### Parameters
84
+
85
+ ##### identity
86
+
87
+ `string`
88
+
89
+ The identity of the user to get.
90
+
91
+ #### Returns
92
+
93
+ `Promise`\<[`IAuthenticationUser`](IAuthenticationUser.md)\>
94
+
95
+ The user details.
96
+
97
+ ***
98
+
99
+ ### remove() {#remove}
100
+
101
+ > **remove**(`email`): `Promise`\<`void`\>
102
+
103
+ Remove a user.
104
+
105
+ #### Parameters
106
+
107
+ ##### email
108
+
109
+ `string`
110
+
111
+ The email address of the user to remove.
112
+
113
+ #### Returns
114
+
115
+ `Promise`\<`void`\>
116
+
117
+ A promise that resolves when the user account has been removed.
118
+
119
+ ***
120
+
121
+ ### updatePassword() {#updatepassword}
122
+
123
+ > **updatePassword**(`email`, `newPassword`, `currentPassword?`): `Promise`\<`void`\>
124
+
125
+ Update the user's password.
126
+
127
+ #### Parameters
128
+
129
+ ##### email
130
+
131
+ `string`
132
+
133
+ The email address of the user to update.
134
+
135
+ ##### newPassword
136
+
137
+ `string`
138
+
139
+ The new password for the user.
140
+
141
+ ##### currentPassword?
142
+
143
+ `string`
144
+
145
+ The current password, optional, if supplied will check against existing.
146
+
147
+ #### Returns
148
+
149
+ `Promise`\<`void`\>
150
+
151
+ A promise that resolves when the password has been updated.
@@ -0,0 +1,175 @@
1
+ # Interface: IAuthenticationAuditComponent
2
+
3
+ Contract definition for authentication audit component.
4
+
5
+ ## Extends
6
+
7
+ - `IComponent`
8
+
9
+ ## Methods
10
+
11
+ ### create() {#create}
12
+
13
+ > **create**(`entry`): `Promise`\<`string`\>
14
+
15
+ Create a new audit entry.
16
+
17
+ #### Parameters
18
+
19
+ ##### entry
20
+
21
+ `Omit`\<[`IAuthenticationAuditEntry`](IAuthenticationAuditEntry.md), `"id"` \| `"dateCreated"`\>
22
+
23
+ The audit entry to be logged.
24
+
25
+ #### Returns
26
+
27
+ `Promise`\<`string`\>
28
+
29
+ The unique identifier of the created audit entry.
30
+
31
+ ***
32
+
33
+ ### get() {#get}
34
+
35
+ > **get**(`id`): `Promise`\<[`IAuthenticationAuditEntry`](IAuthenticationAuditEntry.md)\>
36
+
37
+ Get an audit entry by id.
38
+
39
+ #### Parameters
40
+
41
+ ##### id
42
+
43
+ `string`
44
+
45
+ The unique identifier of the audit entry.
46
+
47
+ #### Returns
48
+
49
+ `Promise`\<[`IAuthenticationAuditEntry`](IAuthenticationAuditEntry.md)\>
50
+
51
+ The audit entry.
52
+
53
+ ***
54
+
55
+ ### update() {#update}
56
+
57
+ > **update**(`id`, `entry`): `Promise`\<`void`\>
58
+
59
+ Update an audit entry.
60
+
61
+ #### Parameters
62
+
63
+ ##### id
64
+
65
+ `string`
66
+
67
+ The unique identifier of the audit entry to update.
68
+
69
+ ##### entry
70
+
71
+ `Partial`\<`Omit`\<[`IAuthenticationAuditEntry`](IAuthenticationAuditEntry.md), `"id"` \| `"dateCreated"`\>\>
72
+
73
+ The fields to update on the audit entry.
74
+
75
+ #### Returns
76
+
77
+ `Promise`\<`void`\>
78
+
79
+ A promise that resolves when the audit entry has been updated.
80
+
81
+ ***
82
+
83
+ ### remove() {#remove}
84
+
85
+ > **remove**(`id`): `Promise`\<`void`\>
86
+
87
+ Remove an audit entry.
88
+
89
+ #### Parameters
90
+
91
+ ##### id
92
+
93
+ `string`
94
+
95
+ The unique identifier of the audit entry to remove.
96
+
97
+ #### Returns
98
+
99
+ `Promise`\<`void`\>
100
+
101
+ A promise that resolves when the audit entry has been removed.
102
+
103
+ ***
104
+
105
+ ### query() {#query}
106
+
107
+ > **query**(`options?`, `cursor?`, `limit?`): `Promise`\<\{ `entries`: [`IAuthenticationAuditEntry`](IAuthenticationAuditEntry.md)[]; `cursor?`: `string`; \}\>
108
+
109
+ Query the audit entries.
110
+
111
+ #### Parameters
112
+
113
+ ##### options?
114
+
115
+ The query options.
116
+
117
+ ###### actorId?
118
+
119
+ `string`
120
+
121
+ The actor identifier to filter the audit entries, optional.
122
+
123
+ ###### organizationId?
124
+
125
+ `string`
126
+
127
+ The organization identifier to filter the audit entries, optional.
128
+
129
+ ###### tenantId?
130
+
131
+ `string`
132
+
133
+ The tenant identifier to filter the audit entries, optional.
134
+
135
+ ###### nodeId?
136
+
137
+ `string`
138
+
139
+ The node identifier to filter the audit entries, optional.
140
+
141
+ ###### event?
142
+
143
+ `string`
144
+
145
+ The audit event to filter the audit entries, optional.
146
+
147
+ ###### startDate?
148
+
149
+ `string`
150
+
151
+ The start date to filter the audit entries, optional.
152
+
153
+ ###### endDate?
154
+
155
+ `string`
156
+
157
+ The end date to filter the audit entries, optional.
158
+
159
+ ##### cursor?
160
+
161
+ `string`
162
+
163
+ The cursor for pagination.
164
+
165
+ ##### limit?
166
+
167
+ `number`
168
+
169
+ The maximum number of entries to return.
170
+
171
+ #### Returns
172
+
173
+ `Promise`\<\{ `entries`: [`IAuthenticationAuditEntry`](IAuthenticationAuditEntry.md)[]; `cursor?`: `string`; \}\>
174
+
175
+ The audit entries.
@@ -0,0 +1,91 @@
1
+ # Interface: IAuthenticationAuditEntry
2
+
3
+ Contract definition for authentication audit entry.
4
+
5
+ ## Properties
6
+
7
+ ### id {#id}
8
+
9
+ > **id**: `string`
10
+
11
+ The unique identifier for the audit entry.
12
+
13
+ ***
14
+
15
+ ### event {#event}
16
+
17
+ > **event**: `string`
18
+
19
+ The audit event that occurred.
20
+
21
+ ***
22
+
23
+ ### dateCreated {#datecreated}
24
+
25
+ > **dateCreated**: `string`
26
+
27
+ The timestamp of the audit entry in ISO 8601 format.
28
+
29
+ ***
30
+
31
+ ### actorId? {#actorid}
32
+
33
+ > `optional` **actorId?**: `string`
34
+
35
+ The actor identifier, could be e-mail, username, or other unique identifier.
36
+
37
+ ***
38
+
39
+ ### nodeId? {#nodeid}
40
+
41
+ > `optional` **nodeId?**: `string`
42
+
43
+ The node identifier associated with the audit entry, if applicable.
44
+
45
+ ***
46
+
47
+ ### organizationId? {#organizationid}
48
+
49
+ > `optional` **organizationId?**: `string`
50
+
51
+ The organization identifier associated with the audit entry, if applicable.
52
+
53
+ ***
54
+
55
+ ### tenantId? {#tenantid}
56
+
57
+ > `optional` **tenantId?**: `string`
58
+
59
+ The tenant identifier associated with the audit entry, if applicable.
60
+
61
+ ***
62
+
63
+ ### ipAddressHashes? {#ipaddresshashes}
64
+
65
+ > `optional` **ipAddressHashes?**: `string`[]
66
+
67
+ The hashed IP addresses of the client.
68
+
69
+ ***
70
+
71
+ ### userAgent? {#useragent}
72
+
73
+ > `optional` **userAgent?**: `string`
74
+
75
+ The user agent string of the client.
76
+
77
+ ***
78
+
79
+ ### correlationId? {#correlationid}
80
+
81
+ > `optional` **correlationId?**: `string`
82
+
83
+ The correlation ID for request tracing.
84
+
85
+ ***
86
+
87
+ ### data? {#data}
88
+
89
+ > `optional` **data?**: `unknown`
90
+
91
+ Additional data related to the audit entry, such as IP address, user agent, etc.
@@ -0,0 +1,107 @@
1
+ # Interface: IAuthenticationComponent
2
+
3
+ Contract definition for authentication component.
4
+
5
+ ## Extends
6
+
7
+ - `IComponent`
8
+
9
+ ## Methods
10
+
11
+ ### login() {#login}
12
+
13
+ > **login**(`email`, `password`): `Promise`\<\{ `token?`: `string`; `expiry`: `number`; \}\>
14
+
15
+ Perform a login for the user.
16
+
17
+ #### Parameters
18
+
19
+ ##### email
20
+
21
+ `string`
22
+
23
+ The email address for the user.
24
+
25
+ ##### password
26
+
27
+ `string`
28
+
29
+ The password for the user.
30
+
31
+ #### Returns
32
+
33
+ `Promise`\<\{ `token?`: `string`; `expiry`: `number`; \}\>
34
+
35
+ The authentication token for the user, if it uses a mechanism with public access.
36
+
37
+ ***
38
+
39
+ ### logout() {#logout}
40
+
41
+ > **logout**(`token?`): `Promise`\<`void`\>
42
+
43
+ Logout the current user.
44
+
45
+ #### Parameters
46
+
47
+ ##### token?
48
+
49
+ `string`
50
+
51
+ The token to logout, if it uses a mechanism with public access.
52
+
53
+ #### Returns
54
+
55
+ `Promise`\<`void`\>
56
+
57
+ A promise that resolves when the logout has been completed.
58
+
59
+ ***
60
+
61
+ ### refresh() {#refresh}
62
+
63
+ > **refresh**(`token?`): `Promise`\<\{ `token?`: `string`; `expiry`: `number`; \}\>
64
+
65
+ Refresh the token.
66
+
67
+ #### Parameters
68
+
69
+ ##### token?
70
+
71
+ `string`
72
+
73
+ The token to refresh, if it uses a mechanism with public access.
74
+
75
+ #### Returns
76
+
77
+ `Promise`\<\{ `token?`: `string`; `expiry`: `number`; \}\>
78
+
79
+ The refreshed token, if it uses a mechanism with public access.
80
+
81
+ ***
82
+
83
+ ### updatePassword() {#updatepassword}
84
+
85
+ > **updatePassword**(`currentPassword`, `newPassword`): `Promise`\<`void`\>
86
+
87
+ Update the user's password.
88
+
89
+ #### Parameters
90
+
91
+ ##### currentPassword
92
+
93
+ `string`
94
+
95
+ The current password for the user.
96
+
97
+ ##### newPassword
98
+
99
+ `string`
100
+
101
+ The new password for the user.
102
+
103
+ #### Returns
104
+
105
+ `Promise`\<`void`\>
106
+
107
+ A promise that resolves when the password has been updated.
@@ -0,0 +1,19 @@
1
+ # Interface: IAuthenticationRateActionConfig
2
+
3
+ Configuration for an authentication rate limited action.
4
+
5
+ ## Properties
6
+
7
+ ### maxAttempts {#maxattempts}
8
+
9
+ > **maxAttempts**: `number`
10
+
11
+ Maximum number of failed attempts allowed per window.
12
+
13
+ ***
14
+
15
+ ### windowMinutes {#windowminutes}
16
+
17
+ > **windowMinutes**: `number`
18
+
19
+ Rate limit window duration in minutes.
@@ -0,0 +1,165 @@
1
+ # Interface: IAuthenticationRateComponent
2
+
3
+ Contract definition for authentication rate component.
4
+
5
+ ## Extends
6
+
7
+ - `IComponent`
8
+
9
+ ## Methods
10
+
11
+ ### start() {#start}
12
+
13
+ > **start**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
14
+
15
+ The service needs to be started when the application is initialized.
16
+
17
+ #### Parameters
18
+
19
+ ##### nodeLoggingComponentType?
20
+
21
+ `string`
22
+
23
+ The node logging component type.
24
+
25
+ #### Returns
26
+
27
+ `Promise`\<`void`\>
28
+
29
+ A promise that resolves when the service has been started.
30
+
31
+ #### Overrides
32
+
33
+ `IComponent.start`
34
+
35
+ ***
36
+
37
+ ### stop() {#stop}
38
+
39
+ > **stop**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
40
+
41
+ The component needs to be stopped when the node is closed.
42
+
43
+ #### Parameters
44
+
45
+ ##### nodeLoggingComponentType?
46
+
47
+ `string`
48
+
49
+ The node logging component type.
50
+
51
+ #### Returns
52
+
53
+ `Promise`\<`void`\>
54
+
55
+ A promise that resolves when the service has been stopped.
56
+
57
+ #### Overrides
58
+
59
+ `IComponent.stop`
60
+
61
+ ***
62
+
63
+ ### registerAction() {#registeraction}
64
+
65
+ > **registerAction**(`action`, `config`): `Promise`\<`void`\>
66
+
67
+ Register or update rate-limit configuration for an action.
68
+
69
+ #### Parameters
70
+
71
+ ##### action
72
+
73
+ `string`
74
+
75
+ The action name.
76
+
77
+ ##### config
78
+
79
+ [`IAuthenticationRateActionConfig`](IAuthenticationRateActionConfig.md)
80
+
81
+ The action configuration.
82
+
83
+ #### Returns
84
+
85
+ `Promise`\<`void`\>
86
+
87
+ A promise that resolves when the action configuration has been stored.
88
+
89
+ ***
90
+
91
+ ### unregisterAction() {#unregisteraction}
92
+
93
+ > **unregisterAction**(`action`): `Promise`\<`void`\>
94
+
95
+ Unregister rate-limit configuration for an action.
96
+
97
+ #### Parameters
98
+
99
+ ##### action
100
+
101
+ `string`
102
+
103
+ The action name.
104
+
105
+ #### Returns
106
+
107
+ `Promise`\<`void`\>
108
+
109
+ A promise that resolves when the action configuration has been removed.
110
+
111
+ ***
112
+
113
+ ### check() {#check}
114
+
115
+ > **check**(`action`, `identifier`): `Promise`\<`string`\>
116
+
117
+ Check the authentication rate for a given action and identifier.
118
+
119
+ #### Parameters
120
+
121
+ ##### action
122
+
123
+ `string`
124
+
125
+ The action to be checked.
126
+
127
+ ##### identifier
128
+
129
+ `string`
130
+
131
+ The identifier to be checked.
132
+
133
+ #### Returns
134
+
135
+ `Promise`\<`string`\>
136
+
137
+ The result of the rate check.
138
+
139
+ ***
140
+
141
+ ### clear() {#clear}
142
+
143
+ > **clear**(`action`, `identifier`): `Promise`\<`void`\>
144
+
145
+ Clear the authentication rate entry for the given action and identifier.
146
+
147
+ #### Parameters
148
+
149
+ ##### action
150
+
151
+ `string`
152
+
153
+ The action to clear.
154
+
155
+ ##### identifier
156
+
157
+ `string`
158
+
159
+ The identifier to clear.
160
+
161
+ #### Returns
162
+
163
+ `Promise`\<`void`\>
164
+
165
+ A promise that resolves when the rate entry has been removed.