@3sixty/api-auth-entity-storage-service 0.20.0-next.0 → 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 (108) hide show
  1. package/README.md +1 -1
  2. package/dist/es/entities/authenticationUser.js +1 -9
  3. package/dist/es/entities/authenticationUser.js.map +1 -1
  4. package/dist/es/entities/authenticationUserV0.js +69 -0
  5. package/dist/es/entities/authenticationUserV0.js.map +1 -0
  6. package/dist/es/index.js +1 -9
  7. package/dist/es/index.js.map +1 -1
  8. package/dist/es/models/IAuthHeaderProcessorConfig.js.map +1 -1
  9. package/dist/es/models/IAuthHeaderProcessorConstructorOptions.js.map +1 -1
  10. package/dist/es/models/IAuthTokenContext.js.map +1 -1
  11. package/dist/es/models/IEntityStorageAuthenticationAdminServiceConfig.js.map +1 -1
  12. package/dist/es/models/IEntityStorageAuthenticationAdminServiceConstructorOptions.js.map +1 -1
  13. package/dist/es/models/IEntityStorageAuthenticationServiceConfig.js.map +1 -1
  14. package/dist/es/models/IEntityStorageAuthenticationServiceConstructorOptions.js.map +1 -1
  15. package/dist/es/processors/authHeaderProcessor.js +9 -14
  16. package/dist/es/processors/authHeaderProcessor.js.map +1 -1
  17. package/dist/es/restEntryPoints.js +1 -8
  18. package/dist/es/restEntryPoints.js.map +1 -1
  19. package/dist/es/routes/entityStorageAuthenticationAdminRoutes.js +22 -14
  20. package/dist/es/routes/entityStorageAuthenticationAdminRoutes.js.map +1 -1
  21. package/dist/es/routes/entityStorageAuthenticationRoutes.js +45 -1
  22. package/dist/es/routes/entityStorageAuthenticationRoutes.js.map +1 -1
  23. package/dist/es/schema.js +2 -4
  24. package/dist/es/schema.js.map +1 -1
  25. package/dist/es/services/entityStorageAuthenticationAdminService.js +69 -68
  26. package/dist/es/services/entityStorageAuthenticationAdminService.js.map +1 -1
  27. package/dist/es/services/entityStorageAuthenticationService.js +29 -17
  28. package/dist/es/services/entityStorageAuthenticationService.js.map +1 -1
  29. package/dist/es/utils/passwordHelper.js +7 -5
  30. package/dist/es/utils/passwordHelper.js.map +1 -1
  31. package/dist/es/utils/tokenHelper.js +2 -23
  32. package/dist/es/utils/tokenHelper.js.map +1 -1
  33. package/dist/types/entities/authenticationUser.d.ts +0 -4
  34. package/dist/types/entities/authenticationUserV0.d.ts +33 -0
  35. package/dist/types/index.d.ts +1 -9
  36. package/dist/types/models/IAuthHeaderProcessorConfig.d.ts +1 -2
  37. package/dist/types/models/IAuthTokenContext.d.ts +0 -4
  38. package/dist/types/models/IEntityStorageAuthenticationAdminServiceConfig.d.ts +14 -3
  39. package/dist/types/models/IEntityStorageAuthenticationAdminServiceConstructorOptions.d.ts +6 -1
  40. package/dist/types/models/IEntityStorageAuthenticationServiceConfig.d.ts +7 -2
  41. package/dist/types/restEntryPoints.d.ts +1 -1
  42. package/dist/types/routes/entityStorageAuthenticationRoutes.d.ts +10 -2
  43. package/dist/types/services/entityStorageAuthenticationAdminService.d.ts +6 -2
  44. package/dist/types/services/entityStorageAuthenticationService.d.ts +6 -1
  45. package/dist/types/utils/passwordHelper.d.ts +6 -3
  46. package/dist/types/utils/tokenHelper.d.ts +2 -11
  47. package/docs/changelog.md +19 -0
  48. package/docs/examples.md +9 -93
  49. package/docs/open-api/spec.json +178 -956
  50. package/docs/reference/classes/AuthHeaderProcessor.md +4 -0
  51. package/docs/reference/classes/AuthenticationUser.md +0 -8
  52. package/docs/reference/classes/AuthenticationUserV0.md +69 -0
  53. package/docs/reference/classes/EntityStorageAuthenticationAdminService.md +11 -3
  54. package/docs/reference/classes/EntityStorageAuthenticationService.md +18 -0
  55. package/docs/reference/classes/PasswordHelper.md +4 -4
  56. package/docs/reference/classes/TokenHelper.md +2 -44
  57. package/docs/reference/functions/authenticationPasswordPolicy.md +31 -0
  58. package/docs/reference/index.md +2 -15
  59. package/docs/reference/interfaces/IAuthHeaderProcessorConfig.md +1 -2
  60. package/docs/reference/interfaces/IAuthTokenContext.md +0 -8
  61. package/docs/reference/interfaces/IEntityStorageAuthenticationAdminServiceConfig.md +38 -4
  62. package/docs/reference/interfaces/IEntityStorageAuthenticationAdminServiceConstructorOptions.md +15 -1
  63. package/docs/reference/interfaces/IEntityStorageAuthenticationServiceConfig.md +15 -1
  64. package/docs/reference/variables/restEntryPoints.md +1 -1
  65. package/locales/en.json +1 -16
  66. package/package.json +7 -8
  67. package/dist/es/entities/authenticationAuditEntry.js +0 -121
  68. package/dist/es/entities/authenticationAuditEntry.js.map +0 -1
  69. package/dist/es/entities/authenticationRateEntry.js +0 -37
  70. package/dist/es/entities/authenticationRateEntry.js.map +0 -1
  71. package/dist/es/models/IEntityStorageAuthenticationAuditServiceConfig.js +0 -4
  72. package/dist/es/models/IEntityStorageAuthenticationAuditServiceConfig.js.map +0 -1
  73. package/dist/es/models/IEntityStorageAuthenticationAuditServiceConstructorOptions.js +0 -2
  74. package/dist/es/models/IEntityStorageAuthenticationAuditServiceConstructorOptions.js.map +0 -1
  75. package/dist/es/models/IEntityStorageAuthenticationRateServiceConfig.js +0 -2
  76. package/dist/es/models/IEntityStorageAuthenticationRateServiceConfig.js.map +0 -1
  77. package/dist/es/models/IEntityStorageAuthenticationRateServiceConstructorOptions.js +0 -2
  78. package/dist/es/models/IEntityStorageAuthenticationRateServiceConstructorOptions.js.map +0 -1
  79. package/dist/es/routes/entityStorageAuthenticationAuditRoutes.js +0 -343
  80. package/dist/es/routes/entityStorageAuthenticationAuditRoutes.js.map +0 -1
  81. package/dist/es/services/entityStorageAuthenticationAuditService.js +0 -240
  82. package/dist/es/services/entityStorageAuthenticationAuditService.js.map +0 -1
  83. package/dist/es/services/entityStorageAuthenticationRateService.js +0 -213
  84. package/dist/es/services/entityStorageAuthenticationRateService.js.map +0 -1
  85. package/dist/types/entities/authenticationAuditEntry.d.ts +0 -49
  86. package/dist/types/entities/authenticationRateEntry.d.ts +0 -17
  87. package/dist/types/models/IEntityStorageAuthenticationAuditServiceConfig.d.ts +0 -9
  88. package/dist/types/models/IEntityStorageAuthenticationAuditServiceConstructorOptions.d.ts +0 -15
  89. package/dist/types/models/IEntityStorageAuthenticationRateServiceConfig.d.ts +0 -10
  90. package/dist/types/models/IEntityStorageAuthenticationRateServiceConstructorOptions.d.ts +0 -25
  91. package/dist/types/routes/entityStorageAuthenticationAuditRoutes.d.ts +0 -54
  92. package/dist/types/services/entityStorageAuthenticationAuditService.d.ts +0 -72
  93. package/dist/types/services/entityStorageAuthenticationRateService.d.ts +0 -60
  94. package/docs/reference/classes/AuthenticationAuditEntry.md +0 -101
  95. package/docs/reference/classes/AuthenticationRateEntry.md +0 -37
  96. package/docs/reference/classes/EntityStorageAuthenticationAuditService.md +0 -241
  97. package/docs/reference/classes/EntityStorageAuthenticationRateService.md +0 -227
  98. package/docs/reference/functions/authenticationAuditCreate.md +0 -37
  99. package/docs/reference/functions/authenticationAuditGet.md +0 -31
  100. package/docs/reference/functions/authenticationAuditQuery.md +0 -31
  101. package/docs/reference/functions/authenticationAuditRemove.md +0 -31
  102. package/docs/reference/functions/authenticationAuditUpdate.md +0 -31
  103. package/docs/reference/functions/generateRestRoutesAuthenticationAudit.md +0 -25
  104. package/docs/reference/interfaces/IEntityStorageAuthenticationAuditServiceConfig.md +0 -11
  105. package/docs/reference/interfaces/IEntityStorageAuthenticationAuditServiceConstructorOptions.md +0 -25
  106. package/docs/reference/interfaces/IEntityStorageAuthenticationRateServiceConfig.md +0 -17
  107. package/docs/reference/interfaces/IEntityStorageAuthenticationRateServiceConstructorOptions.md +0 -53
  108. package/docs/reference/variables/tagsAuthenticationAudit.md +0 -5
@@ -22,10 +22,6 @@
22
22
  {
23
23
  "name": "Authentication Admin",
24
24
  "description": "Authentication Admin endpoints for the REST server."
25
- },
26
- {
27
- "name": "Authentication Audit",
28
- "description": "Authentication audit endpoints for the REST server."
29
25
  }
30
26
  ],
31
27
  "paths": {
@@ -436,6 +432,86 @@
436
432
  }
437
433
  }
438
434
  },
435
+ "/authentication/policy": {
436
+ "get": {
437
+ "operationId": "authenticationPasswordPolicy",
438
+ "summary": "Get the password policy",
439
+ "tags": [
440
+ "Authentication"
441
+ ],
442
+ "requestBody": {
443
+ "description": "A REST request with no input parameters.",
444
+ "required": true,
445
+ "content": {
446
+ "application/json": {
447
+ "schema": {
448
+ "$ref": "#/components/schemas/NoContentRequest"
449
+ }
450
+ }
451
+ }
452
+ },
453
+ "responses": {
454
+ "200": {
455
+ "description": "Get the password policy.",
456
+ "content": {
457
+ "application/json": {
458
+ "schema": {
459
+ "$ref": "#/components/schemas/PasswordOptions"
460
+ },
461
+ "examples": {
462
+ "passwordPolicyResponseExample": {
463
+ "summary": "The response for the password policy request.",
464
+ "value": {
465
+ "minPasswordLength": 15,
466
+ "maxPasswordLength": 128
467
+ }
468
+ }
469
+ }
470
+ }
471
+ }
472
+ },
473
+ "400": {
474
+ "description": "The server cannot process the request, see the content for more details.",
475
+ "content": {
476
+ "application/json": {
477
+ "schema": {
478
+ "$ref": "#/components/schemas/Error"
479
+ },
480
+ "examples": {
481
+ "exampleResponse": {
482
+ "value": {
483
+ "name": "GeneralError",
484
+ "message": "errorMessage",
485
+ "properties": {
486
+ "foo": "bar"
487
+ }
488
+ }
489
+ }
490
+ }
491
+ }
492
+ }
493
+ },
494
+ "500": {
495
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
496
+ "content": {
497
+ "application/json": {
498
+ "schema": {
499
+ "$ref": "#/components/schemas/Error"
500
+ },
501
+ "examples": {
502
+ "exampleResponse": {
503
+ "value": {
504
+ "name": "InternalServerError",
505
+ "message": "errorMessage"
506
+ }
507
+ }
508
+ }
509
+ }
510
+ }
511
+ }
512
+ }
513
+ }
514
+ },
439
515
  "/authentication/admin/users": {
440
516
  "post": {
441
517
  "operationId": "authenticationAdminCreateUser",
@@ -463,11 +539,7 @@
463
539
  "email": "user@example.com",
464
540
  "password": "MyPassword123!",
465
541
  "userIdentity": "did:example:123456789abcdefghi",
466
- "organizationIdentity": "did:example:123456789abcdefghi",
467
- "scope": [
468
- "scope1",
469
- "scope2"
470
- ]
542
+ "organizationIdentity": "did:example:123456789abcdefghi"
471
543
  }
472
544
  }
473
545
  }
@@ -576,11 +648,7 @@
576
648
  "summary": "The request to update an existing user.",
577
649
  "value": {
578
650
  "userIdentity": "did:example:123456789abcdefghi",
579
- "organizationIdentity": "did:example:123456789abcdefghi",
580
- "scope": [
581
- "scope1",
582
- "scope2"
583
- ]
651
+ "organizationIdentity": "did:example:123456789abcdefghi"
584
652
  }
585
653
  }
586
654
  }
@@ -688,11 +756,7 @@
688
756
  "value": {
689
757
  "email": "user@example.com",
690
758
  "userIdentity": "did:example:123456789abcdefghi",
691
- "organizationIdentity": "did:example:123456789abcdefghi",
692
- "scope": [
693
- "scope1",
694
- "scope2"
695
- ]
759
+ "organizationIdentity": "did:example:123456789abcdefghi"
696
760
  }
697
761
  }
698
762
  }
@@ -993,11 +1057,7 @@
993
1057
  "value": {
994
1058
  "email": "user@example.com",
995
1059
  "userIdentity": "did:example:123456789abcdefghi",
996
- "organizationIdentity": "did:example:123456789abcdefghi",
997
- "scope": [
998
- "scope1",
999
- "scope2"
1000
- ]
1060
+ "organizationIdentity": "did:example:123456789abcdefghi"
1001
1061
  }
1002
1062
  }
1003
1063
  }
@@ -1063,952 +1123,96 @@
1063
1123
  }
1064
1124
  }
1065
1125
  }
1066
- },
1067
- "/authentication/audit": {
1068
- "post": {
1069
- "operationId": "authenticationAuditCreate",
1070
- "summary": "Create an authentication audit entry",
1071
- "tags": [
1072
- "Authentication Audit"
1126
+ }
1127
+ },
1128
+ "components": {
1129
+ "schemas": {
1130
+ "AdminUserCreateRequest": {
1131
+ "type": "object",
1132
+ "properties": {
1133
+ "password": {
1134
+ "type": "string"
1135
+ }
1136
+ },
1137
+ "required": [
1138
+ "password"
1073
1139
  ],
1074
- "security": [
1140
+ "allOf": [
1075
1141
  {
1076
- "jwtBearerAuthScheme": []
1142
+ "$ref": "#/components/schemas/AuthenticationUser"
1077
1143
  }
1078
1144
  ],
1079
- "requestBody": {
1080
- "description": "Create an authentication audit entry.",
1081
- "required": true,
1082
- "content": {
1083
- "application/json": {
1084
- "schema": {
1085
- "$ref": "#/components/schemas/AuditCreateRequest"
1086
- },
1087
- "examples": {
1088
- "authenticationAuditCreateRequestExample": {
1089
- "summary": "The request to create an authentication audit entry.",
1090
- "value": {
1091
- "actorId": "user@example.com",
1092
- "event": "login-success",
1093
- "data": {
1094
- "organizationIdentity": "did:example:org1"
1095
- }
1096
- }
1097
- }
1098
- }
1099
- }
1145
+ "description": "The body of the request."
1146
+ },
1147
+ "AdminUserUpdatePasswordRequest": {
1148
+ "type": "object",
1149
+ "properties": {
1150
+ "newPassword": {
1151
+ "type": "string",
1152
+ "description": "The new password for the user."
1153
+ },
1154
+ "currentPassword": {
1155
+ "type": "string",
1156
+ "description": "The current password for the user."
1100
1157
  }
1101
1158
  },
1102
- "responses": {
1103
- "201": {
1104
- "description": "The rest request ended in created response.",
1105
- "headers": {
1106
- "location": {
1107
- "schema": {
1108
- "type": "string"
1109
- },
1110
- "description": "e.g. 018f0b53d5d5704fa3a06d6ed2478575"
1111
- }
1112
- }
1113
- },
1114
- "400": {
1115
- "description": "The server cannot process the request, see the content for more details.",
1116
- "content": {
1117
- "application/json": {
1118
- "schema": {
1119
- "$ref": "#/components/schemas/Error"
1120
- },
1121
- "examples": {
1122
- "exampleResponse": {
1123
- "value": {
1124
- "name": "GeneralError",
1125
- "message": "errorMessage",
1126
- "properties": {
1127
- "foo": "bar"
1128
- }
1129
- }
1130
- }
1131
- }
1132
- }
1133
- }
1134
- },
1135
- "401": {
1136
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1137
- "content": {
1138
- "application/json": {
1139
- "schema": {
1140
- "$ref": "#/components/schemas/Error"
1141
- },
1142
- "examples": {
1143
- "exampleResponse": {
1144
- "value": {
1145
- "name": "UnauthorizedError",
1146
- "message": "errorMessage"
1147
- }
1148
- }
1149
- }
1150
- }
1151
- }
1159
+ "required": [
1160
+ "newPassword"
1161
+ ],
1162
+ "description": "The body of the request."
1163
+ },
1164
+ "AdminUserUpdateRequest": {
1165
+ "description": "The body of the request.",
1166
+ "type": "object",
1167
+ "properties": {
1168
+ "userIdentity": {
1169
+ "type": "string",
1170
+ "description": "The user identity."
1152
1171
  },
1153
- "500": {
1154
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1155
- "content": {
1156
- "application/json": {
1157
- "schema": {
1158
- "$ref": "#/components/schemas/Error"
1159
- },
1160
- "examples": {
1161
- "exampleResponse": {
1162
- "value": {
1163
- "name": "InternalServerError",
1164
- "message": "errorMessage"
1165
- }
1166
- }
1167
- }
1168
- }
1169
- }
1172
+ "organizationIdentity": {
1173
+ "type": "string",
1174
+ "description": "The users organization."
1170
1175
  }
1171
1176
  }
1172
1177
  },
1173
- "get": {
1174
- "operationId": "authenticationAuditQuery",
1175
- "summary": "Query authentication audit entries",
1176
- "tags": [
1177
- "Authentication Audit"
1178
- ],
1179
- "parameters": [
1180
- {
1181
- "name": "actorId",
1182
- "description": "The actor identifier to filter by.",
1183
- "in": "query",
1184
- "required": false,
1185
- "schema": {
1186
- "type": "string"
1187
- },
1188
- "example": "user@example.com"
1189
- },
1190
- {
1191
- "name": "organizationId",
1192
- "description": "The organization identifier to filter by.",
1193
- "in": "query",
1194
- "required": false,
1195
- "schema": {
1196
- "type": "string"
1197
- }
1178
+ "AuthenticationUser": {
1179
+ "description": "Contract definition for authentication user.",
1180
+ "type": "object",
1181
+ "properties": {
1182
+ "email": {
1183
+ "type": "string",
1184
+ "description": "The user e-mail address."
1198
1185
  },
1199
- {
1200
- "name": "tenantId",
1201
- "description": "The tenant identifier to filter by.",
1202
- "in": "query",
1203
- "required": false,
1204
- "schema": {
1205
- "type": "string"
1206
- }
1186
+ "userIdentity": {
1187
+ "type": "string",
1188
+ "description": "The user identity."
1207
1189
  },
1208
- {
1209
- "name": "nodeId",
1210
- "description": "The node identifier to filter by.",
1211
- "in": "query",
1212
- "required": false,
1213
- "schema": {
1214
- "type": "string"
1215
- }
1190
+ "organizationIdentity": {
1191
+ "type": "string",
1192
+ "description": "The users organization."
1193
+ }
1194
+ },
1195
+ "required": [
1196
+ "email",
1197
+ "userIdentity",
1198
+ "organizationIdentity"
1199
+ ]
1200
+ },
1201
+ "Error": {
1202
+ "description": "Model to describe serialized error.",
1203
+ "type": "object",
1204
+ "properties": {
1205
+ "name": {
1206
+ "type": "string",
1207
+ "description": "The name for the error."
1216
1208
  },
1217
- {
1218
- "name": "event",
1219
- "description": "The event to filter by.",
1220
- "in": "query",
1221
- "required": false,
1222
- "schema": {
1223
- "anyOf": [
1224
- {
1225
- "$ref": "#/components/schemas/AuthAuditEvent"
1226
- },
1227
- {
1228
- "type": "string"
1229
- }
1230
- ]
1231
- },
1232
- "example": "login-success"
1209
+ "message": {
1210
+ "type": "string",
1211
+ "description": "The message for the error as an i18n key."
1233
1212
  },
1234
- {
1235
- "name": "startDate",
1236
- "description": "The inclusive start date for filtering, in ISO 8601 format.",
1237
- "in": "query",
1238
- "required": false,
1239
- "schema": {
1240
- "type": "string"
1241
- },
1242
- "example": "2026-01-01T00:00:00.000Z"
1243
- },
1244
- {
1245
- "name": "endDate",
1246
- "description": "The inclusive end date for filtering, in ISO 8601 format.",
1247
- "in": "query",
1248
- "required": false,
1249
- "schema": {
1250
- "type": "string"
1251
- },
1252
- "example": "2026-01-31T23:59:59.999Z"
1253
- },
1254
- {
1255
- "name": "cursor",
1256
- "description": "The pagination cursor.",
1257
- "in": "query",
1258
- "required": false,
1259
- "schema": {
1260
- "type": "string"
1261
- }
1262
- },
1263
- {
1264
- "name": "limit",
1265
- "description": "The maximum number of results to return.",
1266
- "in": "query",
1267
- "required": false,
1268
- "schema": {
1269
- "type": "string"
1270
- },
1271
- "example": "50"
1272
- }
1273
- ],
1274
- "security": [
1275
- {
1276
- "jwtBearerAuthScheme": []
1277
- }
1278
- ],
1279
- "responses": {
1280
- "200": {
1281
- "description": "Response from querying authentication audit entries.",
1282
- "content": {
1283
- "application/json": {
1284
- "schema": {
1285
- "$ref": "#/components/schemas/AuditQueryResponse"
1286
- },
1287
- "examples": {
1288
- "authenticationAuditQueryResponseExample": {
1289
- "summary": "The response for querying authentication audit entries.",
1290
- "value": {
1291
- "entries": [
1292
- {
1293
- "id": "018f0b53d5d5704fa3a06d6ed2478575",
1294
- "actorId": "user@example.com",
1295
- "dateCreated": "2026-01-12T09:05:23.123Z",
1296
- "event": "login-success",
1297
- "data": {
1298
- "organizationIdentity": "did:example:org1"
1299
- }
1300
- }
1301
- ],
1302
- "cursor": "next-cursor"
1303
- }
1304
- }
1305
- }
1306
- }
1307
- }
1308
- },
1309
- "400": {
1310
- "description": "The server cannot process the request, see the content for more details.",
1311
- "content": {
1312
- "application/json": {
1313
- "schema": {
1314
- "$ref": "#/components/schemas/Error"
1315
- },
1316
- "examples": {
1317
- "exampleResponse": {
1318
- "value": {
1319
- "name": "GeneralError",
1320
- "message": "errorMessage",
1321
- "properties": {
1322
- "foo": "bar"
1323
- }
1324
- }
1325
- }
1326
- }
1327
- }
1328
- }
1329
- },
1330
- "401": {
1331
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1332
- "content": {
1333
- "application/json": {
1334
- "schema": {
1335
- "$ref": "#/components/schemas/Error"
1336
- },
1337
- "examples": {
1338
- "exampleResponse": {
1339
- "value": {
1340
- "name": "UnauthorizedError",
1341
- "message": "errorMessage"
1342
- }
1343
- }
1344
- }
1345
- }
1346
- }
1347
- },
1348
- "500": {
1349
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1350
- "content": {
1351
- "application/json": {
1352
- "schema": {
1353
- "$ref": "#/components/schemas/Error"
1354
- },
1355
- "examples": {
1356
- "exampleResponse": {
1357
- "value": {
1358
- "name": "InternalServerError",
1359
- "message": "errorMessage"
1360
- }
1361
- }
1362
- }
1363
- }
1364
- }
1365
- }
1366
- }
1367
- }
1368
- },
1369
- "/authentication/audit/{id}": {
1370
- "get": {
1371
- "operationId": "authenticationAuditGet",
1372
- "summary": "Get an authentication audit entry",
1373
- "tags": [
1374
- "Authentication Audit"
1375
- ],
1376
- "parameters": [
1377
- {
1378
- "name": "id",
1379
- "description": "The audit entry id.",
1380
- "in": "path",
1381
- "required": true,
1382
- "schema": {
1383
- "type": "string"
1384
- },
1385
- "style": "simple",
1386
- "example": "018f0b53d5d5704fa3a06d6ed2478575"
1387
- }
1388
- ],
1389
- "security": [
1390
- {
1391
- "jwtBearerAuthScheme": []
1392
- }
1393
- ],
1394
- "responses": {
1395
- "200": {
1396
- "description": "Response from getting an authentication audit entry.",
1397
- "content": {
1398
- "application/json": {
1399
- "schema": {
1400
- "$ref": "#/components/schemas/AuthenticationAuditEntry"
1401
- },
1402
- "examples": {
1403
- "authenticationAuditGetResponseExample": {
1404
- "summary": "The response for getting an authentication audit entry.",
1405
- "value": {
1406
- "id": "018f0b53d5d5704fa3a06d6ed2478575",
1407
- "actorId": "user@example.com",
1408
- "dateCreated": "2026-01-12T09:05:23.123Z",
1409
- "event": "login-success",
1410
- "data": {
1411
- "organizationIdentity": "did:example:org1"
1412
- }
1413
- }
1414
- }
1415
- }
1416
- }
1417
- }
1418
- },
1419
- "400": {
1420
- "description": "The server cannot process the request, see the content for more details.",
1421
- "content": {
1422
- "application/json": {
1423
- "schema": {
1424
- "$ref": "#/components/schemas/Error"
1425
- },
1426
- "examples": {
1427
- "exampleResponse": {
1428
- "value": {
1429
- "name": "GeneralError",
1430
- "message": "errorMessage",
1431
- "properties": {
1432
- "foo": "bar"
1433
- }
1434
- }
1435
- }
1436
- }
1437
- }
1438
- }
1439
- },
1440
- "401": {
1441
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1442
- "content": {
1443
- "application/json": {
1444
- "schema": {
1445
- "$ref": "#/components/schemas/Error"
1446
- },
1447
- "examples": {
1448
- "exampleResponse": {
1449
- "value": {
1450
- "name": "UnauthorizedError",
1451
- "message": "errorMessage"
1452
- }
1453
- }
1454
- }
1455
- }
1456
- }
1457
- },
1458
- "500": {
1459
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1460
- "content": {
1461
- "application/json": {
1462
- "schema": {
1463
- "$ref": "#/components/schemas/Error"
1464
- },
1465
- "examples": {
1466
- "exampleResponse": {
1467
- "value": {
1468
- "name": "InternalServerError",
1469
- "message": "errorMessage"
1470
- }
1471
- }
1472
- }
1473
- }
1474
- }
1475
- }
1476
- }
1477
- },
1478
- "put": {
1479
- "operationId": "authenticationAuditUpdate",
1480
- "summary": "Update an authentication audit entry",
1481
- "tags": [
1482
- "Authentication Audit"
1483
- ],
1484
- "parameters": [
1485
- {
1486
- "name": "id",
1487
- "description": "The audit entry id.",
1488
- "in": "path",
1489
- "required": true,
1490
- "schema": {
1491
- "type": "string"
1492
- },
1493
- "style": "simple",
1494
- "example": "018f0b53d5d5704fa3a06d6ed2478575"
1495
- }
1496
- ],
1497
- "security": [
1498
- {
1499
- "jwtBearerAuthScheme": []
1500
- }
1501
- ],
1502
- "requestBody": {
1503
- "description": "Update an authentication audit entry.",
1504
- "required": true,
1505
- "content": {
1506
- "application/json": {
1507
- "schema": {
1508
- "$ref": "#/components/schemas/AuditUpdateRequest"
1509
- },
1510
- "examples": {
1511
- "authenticationAuditUpdateRequestExample": {
1512
- "summary": "The request to update an authentication audit entry.",
1513
- "value": {
1514
- "data": {
1515
- "organizationIdentity": "did:example:org1"
1516
- }
1517
- }
1518
- }
1519
- }
1520
- }
1521
- }
1522
- },
1523
- "responses": {
1524
- "204": {
1525
- "description": "The rest request ended in success with no data."
1526
- },
1527
- "400": {
1528
- "description": "The server cannot process the request, see the content for more details.",
1529
- "content": {
1530
- "application/json": {
1531
- "schema": {
1532
- "$ref": "#/components/schemas/Error"
1533
- },
1534
- "examples": {
1535
- "exampleResponse": {
1536
- "value": {
1537
- "name": "GeneralError",
1538
- "message": "errorMessage",
1539
- "properties": {
1540
- "foo": "bar"
1541
- }
1542
- }
1543
- }
1544
- }
1545
- }
1546
- }
1547
- },
1548
- "401": {
1549
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1550
- "content": {
1551
- "application/json": {
1552
- "schema": {
1553
- "$ref": "#/components/schemas/Error"
1554
- },
1555
- "examples": {
1556
- "exampleResponse": {
1557
- "value": {
1558
- "name": "UnauthorizedError",
1559
- "message": "errorMessage"
1560
- }
1561
- }
1562
- }
1563
- }
1564
- }
1565
- },
1566
- "500": {
1567
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1568
- "content": {
1569
- "application/json": {
1570
- "schema": {
1571
- "$ref": "#/components/schemas/Error"
1572
- },
1573
- "examples": {
1574
- "exampleResponse": {
1575
- "value": {
1576
- "name": "InternalServerError",
1577
- "message": "errorMessage"
1578
- }
1579
- }
1580
- }
1581
- }
1582
- }
1583
- }
1584
- }
1585
- },
1586
- "delete": {
1587
- "operationId": "authenticationAuditRemove",
1588
- "summary": "Remove an authentication audit entry",
1589
- "tags": [
1590
- "Authentication Audit"
1591
- ],
1592
- "parameters": [
1593
- {
1594
- "name": "id",
1595
- "description": "The audit entry id.",
1596
- "in": "path",
1597
- "required": true,
1598
- "schema": {
1599
- "type": "string"
1600
- },
1601
- "style": "simple",
1602
- "example": "018f0b53d5d5704fa3a06d6ed2478575"
1603
- }
1604
- ],
1605
- "security": [
1606
- {
1607
- "jwtBearerAuthScheme": []
1608
- }
1609
- ],
1610
- "responses": {
1611
- "204": {
1612
- "description": "The rest request ended in success with no data."
1613
- },
1614
- "400": {
1615
- "description": "The server cannot process the request, see the content for more details.",
1616
- "content": {
1617
- "application/json": {
1618
- "schema": {
1619
- "$ref": "#/components/schemas/Error"
1620
- },
1621
- "examples": {
1622
- "exampleResponse": {
1623
- "value": {
1624
- "name": "GeneralError",
1625
- "message": "errorMessage",
1626
- "properties": {
1627
- "foo": "bar"
1628
- }
1629
- }
1630
- }
1631
- }
1632
- }
1633
- }
1634
- },
1635
- "401": {
1636
- "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1637
- "content": {
1638
- "application/json": {
1639
- "schema": {
1640
- "$ref": "#/components/schemas/Error"
1641
- },
1642
- "examples": {
1643
- "exampleResponse": {
1644
- "value": {
1645
- "name": "UnauthorizedError",
1646
- "message": "errorMessage"
1647
- }
1648
- }
1649
- }
1650
- }
1651
- }
1652
- },
1653
- "500": {
1654
- "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1655
- "content": {
1656
- "application/json": {
1657
- "schema": {
1658
- "$ref": "#/components/schemas/Error"
1659
- },
1660
- "examples": {
1661
- "exampleResponse": {
1662
- "value": {
1663
- "name": "InternalServerError",
1664
- "message": "errorMessage"
1665
- }
1666
- }
1667
- }
1668
- }
1669
- }
1670
- }
1671
- }
1672
- }
1673
- }
1674
- },
1675
- "components": {
1676
- "schemas": {
1677
- "AdminUserCreateRequest": {
1678
- "type": "object",
1679
- "properties": {
1680
- "password": {
1681
- "type": "string"
1682
- }
1683
- },
1684
- "required": [
1685
- "password"
1686
- ],
1687
- "allOf": [
1688
- {
1689
- "$ref": "#/components/schemas/AuthenticationUser"
1690
- }
1691
- ],
1692
- "description": "The body of the request."
1693
- },
1694
- "AdminUserUpdatePasswordRequest": {
1695
- "type": "object",
1696
- "properties": {
1697
- "newPassword": {
1698
- "type": "string",
1699
- "description": "The new password for the user."
1700
- },
1701
- "currentPassword": {
1702
- "type": "string",
1703
- "description": "The current password for the user."
1704
- }
1705
- },
1706
- "required": [
1707
- "newPassword"
1708
- ],
1709
- "description": "The body of the request."
1710
- },
1711
- "AdminUserUpdateRequest": {
1712
- "description": "The body of the request.",
1713
- "type": "object",
1714
- "properties": {
1715
- "userIdentity": {
1716
- "type": "string",
1717
- "description": "The user identity."
1718
- },
1719
- "organizationIdentity": {
1720
- "type": "string",
1721
- "description": "The users organization."
1722
- },
1723
- "scope": {
1724
- "type": "array",
1725
- "items": {
1726
- "type": "string"
1727
- },
1728
- "description": "The scope assigned to the user, comma separated."
1729
- }
1730
- }
1731
- },
1732
- "AuditCreateRequest": {
1733
- "description": "The body of the request.",
1734
- "type": "object",
1735
- "properties": {
1736
- "event": {
1737
- "anyOf": [
1738
- {
1739
- "$ref": "#/components/schemas/AuthAuditEvent"
1740
- },
1741
- {
1742
- "type": "string"
1743
- }
1744
- ],
1745
- "description": "The audit event that occurred."
1746
- },
1747
- "actorId": {
1748
- "type": "string",
1749
- "description": "The actor identifier, could be e-mail, username, or other unique identifier."
1750
- },
1751
- "nodeId": {
1752
- "type": "string",
1753
- "description": "The node identifier associated with the audit entry, if applicable."
1754
- },
1755
- "organizationId": {
1756
- "type": "string",
1757
- "description": "The organization identifier associated with the audit entry, if applicable."
1758
- },
1759
- "tenantId": {
1760
- "type": "string",
1761
- "description": "The tenant identifier associated with the audit entry, if applicable."
1762
- },
1763
- "ipAddressHashes": {
1764
- "type": "array",
1765
- "items": {
1766
- "type": "string"
1767
- },
1768
- "description": "The hashed IP addresses of the client."
1769
- },
1770
- "userAgent": {
1771
- "type": "string",
1772
- "description": "The user agent string of the client."
1773
- },
1774
- "correlationId": {
1775
- "type": "string",
1776
- "description": "The correlation ID for request tracing."
1777
- },
1778
- "data": {
1779
- "description": "Additional data related to the audit entry, such as IP address, user agent, etc."
1780
- }
1781
- },
1782
- "required": [
1783
- "event"
1784
- ]
1785
- },
1786
- "AuditQueryResponse": {
1787
- "type": "object",
1788
- "properties": {
1789
- "entries": {
1790
- "type": "array",
1791
- "items": {
1792
- "$ref": "#/components/schemas/AuthenticationAuditEntry"
1793
- },
1794
- "description": "The returned audit entries."
1795
- },
1796
- "cursor": {
1797
- "type": "string",
1798
- "description": "The cursor to retrieve the next page, if any."
1799
- }
1800
- },
1801
- "required": [
1802
- "entries"
1803
- ],
1804
- "description": "The response body."
1805
- },
1806
- "AuditUpdateRequest": {
1807
- "description": "The body of the request.",
1808
- "type": "object",
1809
- "properties": {
1810
- "event": {
1811
- "anyOf": [
1812
- {
1813
- "$ref": "#/components/schemas/AuthAuditEvent"
1814
- },
1815
- {
1816
- "type": "string"
1817
- }
1818
- ],
1819
- "description": "The audit event that occurred."
1820
- },
1821
- "actorId": {
1822
- "type": "string",
1823
- "description": "The actor identifier, could be e-mail, username, or other unique identifier."
1824
- },
1825
- "nodeId": {
1826
- "type": "string",
1827
- "description": "The node identifier associated with the audit entry, if applicable."
1828
- },
1829
- "organizationId": {
1830
- "type": "string",
1831
- "description": "The organization identifier associated with the audit entry, if applicable."
1832
- },
1833
- "tenantId": {
1834
- "type": "string",
1835
- "description": "The tenant identifier associated with the audit entry, if applicable."
1836
- },
1837
- "ipAddressHashes": {
1838
- "type": "array",
1839
- "items": {
1840
- "type": "string"
1841
- },
1842
- "description": "The hashed IP addresses of the client."
1843
- },
1844
- "userAgent": {
1845
- "type": "string",
1846
- "description": "The user agent string of the client."
1847
- },
1848
- "correlationId": {
1849
- "type": "string",
1850
- "description": "The correlation ID for request tracing."
1851
- },
1852
- "data": {
1853
- "description": "Additional data related to the audit entry, such as IP address, user agent, etc."
1854
- }
1855
- }
1856
- },
1857
- "AuthAuditEvent": {
1858
- "description": "Supported authentication audit event values.",
1859
- "anyOf": [
1860
- {
1861
- "const": "login-success",
1862
- "description": "Login success."
1863
- },
1864
- {
1865
- "const": "login-failure",
1866
- "description": "Login failure."
1867
- },
1868
- {
1869
- "const": "logout",
1870
- "description": "Logout."
1871
- },
1872
- {
1873
- "const": "token-refreshed",
1874
- "description": "Token refreshed."
1875
- },
1876
- {
1877
- "const": "account-created",
1878
- "description": "Account created."
1879
- },
1880
- {
1881
- "const": "account-deleted",
1882
- "description": "Account deleted."
1883
- },
1884
- {
1885
- "const": "account-updated",
1886
- "description": "Account updated."
1887
- },
1888
- {
1889
- "const": "account-locked",
1890
- "description": "Account locked."
1891
- },
1892
- {
1893
- "const": "account-unlocked",
1894
- "description": "Account unlocked."
1895
- },
1896
- {
1897
- "const": "password-changed",
1898
- "description": "Password changed."
1899
- }
1900
- ]
1901
- },
1902
- "AuthenticationAuditEntry": {
1903
- "description": "Contract definition for authentication audit entry.",
1904
- "type": "object",
1905
- "properties": {
1906
- "id": {
1907
- "type": "string",
1908
- "description": "The unique identifier for the audit entry."
1909
- },
1910
- "event": {
1911
- "anyOf": [
1912
- {
1913
- "$ref": "#/components/schemas/AuthAuditEvent"
1914
- },
1915
- {
1916
- "type": "string"
1917
- }
1918
- ],
1919
- "description": "The audit event that occurred."
1920
- },
1921
- "dateCreated": {
1922
- "type": "string",
1923
- "description": "The timestamp of the audit entry in ISO 8601 format."
1924
- },
1925
- "actorId": {
1926
- "type": "string",
1927
- "description": "The actor identifier, could be e-mail, username, or other unique identifier."
1928
- },
1929
- "nodeId": {
1930
- "type": "string",
1931
- "description": "The node identifier associated with the audit entry, if applicable."
1932
- },
1933
- "organizationId": {
1934
- "type": "string",
1935
- "description": "The organization identifier associated with the audit entry, if applicable."
1936
- },
1937
- "tenantId": {
1938
- "type": "string",
1939
- "description": "The tenant identifier associated with the audit entry, if applicable."
1940
- },
1941
- "ipAddressHashes": {
1942
- "type": "array",
1943
- "items": {
1944
- "type": "string"
1945
- },
1946
- "description": "The hashed IP addresses of the client."
1947
- },
1948
- "userAgent": {
1949
- "type": "string",
1950
- "description": "The user agent string of the client."
1951
- },
1952
- "correlationId": {
1953
- "type": "string",
1954
- "description": "The correlation ID for request tracing."
1955
- },
1956
- "data": {
1957
- "description": "Additional data related to the audit entry, such as IP address, user agent, etc."
1958
- }
1959
- },
1960
- "required": [
1961
- "id",
1962
- "event",
1963
- "dateCreated"
1964
- ]
1965
- },
1966
- "AuthenticationUser": {
1967
- "description": "Contract definition for authentication user.",
1968
- "type": "object",
1969
- "properties": {
1970
- "email": {
1971
- "type": "string",
1972
- "description": "The user e-mail address."
1973
- },
1974
- "userIdentity": {
1975
- "type": "string",
1976
- "description": "The user identity."
1977
- },
1978
- "organizationIdentity": {
1979
- "type": "string",
1980
- "description": "The users organization."
1981
- },
1982
- "scope": {
1983
- "type": "array",
1984
- "items": {
1985
- "type": "string"
1986
- },
1987
- "description": "The scope assigned to the user, comma separated."
1988
- }
1989
- },
1990
- "required": [
1991
- "email",
1992
- "userIdentity",
1993
- "organizationIdentity",
1994
- "scope"
1995
- ]
1996
- },
1997
- "Error": {
1998
- "description": "Model to describe serialized error.",
1999
- "type": "object",
2000
- "properties": {
2001
- "name": {
2002
- "type": "string",
2003
- "description": "The name for the error."
2004
- },
2005
- "message": {
2006
- "type": "string",
2007
- "description": "The message for the error as an i18n key."
2008
- },
2009
- "source": {
2010
- "type": "string",
2011
- "description": "The source of the error."
1213
+ "source": {
1214
+ "type": "string",
1215
+ "description": "The source of the error."
2012
1216
  },
2013
1217
  "properties": {
2014
1218
  "type": "object",
@@ -2069,6 +1273,24 @@
2069
1273
  },
2070
1274
  "description": "The logout token details."
2071
1275
  },
1276
+ "NoContentRequest": {
1277
+ "not": {},
1278
+ "description": "Data to return send as the body."
1279
+ },
1280
+ "PasswordOptions": {
1281
+ "description": "Password length validation options.",
1282
+ "type": "object",
1283
+ "properties": {
1284
+ "minPasswordLength": {
1285
+ "type": "number",
1286
+ "description": "The minimum password length for validation."
1287
+ },
1288
+ "maxPasswordLength": {
1289
+ "type": "number",
1290
+ "description": "The maximum password length for validation."
1291
+ }
1292
+ }
1293
+ },
2072
1294
  "RefreshTokenRequest": {
2073
1295
  "type": "object",
2074
1296
  "properties": {