@3sixty/api-auth-entity-storage-models 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.
- package/README.md +1 -1
- package/dist/es/index.js +2 -12
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IAuthenticationAdminComponent.js.map +1 -1
- package/dist/es/models/IAuthenticationComponent.js.map +1 -1
- package/dist/es/models/IAuthenticationUser.js.map +1 -1
- package/dist/es/models/IAuthenticationUserSecure.js.map +1 -1
- package/dist/es/models/{api/IAuditGetRequest.js → IPasswordOptions.js} +1 -1
- package/dist/es/models/IPasswordOptions.js.map +1 -0
- package/dist/es/models/api/IAdminUserCreateRequest.js.map +1 -1
- package/dist/es/models/api/IAdminUserGetByIdentityRequest.js.map +1 -1
- package/dist/es/models/api/IAdminUserGetRequest.js.map +1 -1
- package/dist/es/models/api/IAdminUserGetResponse.js.map +1 -1
- package/dist/es/models/api/IAdminUserRemoveRequest.js.map +1 -1
- package/dist/es/models/api/IAdminUserUpdatePasswordRequest.js.map +1 -1
- package/dist/es/models/api/IAdminUserUpdateRequest.js.map +1 -1
- package/dist/es/models/api/ILoginRequest.js.map +1 -1
- package/dist/es/models/api/ILoginResponse.js.map +1 -1
- package/dist/es/models/api/ILogoutRequest.js.map +1 -1
- package/dist/es/models/api/IPasswordPolicyResponse.js +2 -0
- package/dist/es/models/api/IPasswordPolicyResponse.js.map +1 -0
- package/dist/es/models/api/IRefreshTokenRequest.js.map +1 -1
- package/dist/es/models/api/IRefreshTokenResponse.js.map +1 -1
- package/dist/es/models/api/IUpdatePasswordRequest.js.map +1 -1
- package/dist/types/index.d.ts +2 -12
- package/dist/types/models/IAuthenticationComponent.d.ts +6 -0
- package/dist/types/models/IAuthenticationUser.d.ts +0 -4
- package/dist/types/models/IPasswordOptions.d.ts +13 -0
- package/dist/types/models/api/IPasswordPolicyResponse.d.ts +10 -0
- package/docs/changelog.md +11 -0
- package/docs/examples.md +15 -6
- package/docs/reference/index.md +2 -19
- package/docs/reference/interfaces/IAuthenticationComponent.md +14 -0
- package/docs/reference/interfaces/IAuthenticationUser.md +0 -8
- package/docs/reference/interfaces/IAuthenticationUserSecure.md +0 -12
- package/docs/reference/interfaces/IPasswordOptions.md +19 -0
- package/docs/reference/interfaces/IPasswordPolicyResponse.md +11 -0
- package/package.json +3 -3
- package/dist/es/models/IAuthenticationAuditComponent.js +0 -2
- package/dist/es/models/IAuthenticationAuditComponent.js.map +0 -1
- package/dist/es/models/IAuthenticationAuditEntry.js +0 -2
- package/dist/es/models/IAuthenticationAuditEntry.js.map +0 -1
- package/dist/es/models/IAuthenticationRateActionConfig.js +0 -4
- package/dist/es/models/IAuthenticationRateActionConfig.js.map +0 -1
- package/dist/es/models/IAuthenticationRateComponent.js +0 -2
- package/dist/es/models/IAuthenticationRateComponent.js.map +0 -1
- package/dist/es/models/api/IAuditCreateRequest.js +0 -2
- package/dist/es/models/api/IAuditCreateRequest.js.map +0 -1
- package/dist/es/models/api/IAuditGetRequest.js.map +0 -1
- package/dist/es/models/api/IAuditGetResponse.js +0 -2
- package/dist/es/models/api/IAuditGetResponse.js.map +0 -1
- package/dist/es/models/api/IAuditQueryRequest.js +0 -2
- package/dist/es/models/api/IAuditQueryRequest.js.map +0 -1
- package/dist/es/models/api/IAuditQueryResponse.js +0 -2
- package/dist/es/models/api/IAuditQueryResponse.js.map +0 -1
- package/dist/es/models/api/IAuditRemoveRequest.js +0 -4
- package/dist/es/models/api/IAuditRemoveRequest.js.map +0 -1
- package/dist/es/models/api/IAuditUpdateRequest.js +0 -2
- package/dist/es/models/api/IAuditUpdateRequest.js.map +0 -1
- package/dist/es/models/authAuditEvent.js +0 -49
- package/dist/es/models/authAuditEvent.js.map +0 -1
- package/dist/types/models/IAuthenticationAuditComponent.d.ts +0 -59
- package/dist/types/models/IAuthenticationAuditEntry.d.ts +0 -50
- package/dist/types/models/IAuthenticationRateActionConfig.d.ts +0 -13
- package/dist/types/models/IAuthenticationRateComponent.d.ts +0 -46
- package/dist/types/models/api/IAuditCreateRequest.d.ts +0 -10
- package/dist/types/models/api/IAuditGetRequest.d.ts +0 -14
- package/dist/types/models/api/IAuditGetResponse.d.ts +0 -10
- package/dist/types/models/api/IAuditQueryRequest.d.ts +0 -47
- package/dist/types/models/api/IAuditQueryResponse.d.ts +0 -19
- package/dist/types/models/api/IAuditRemoveRequest.d.ts +0 -14
- package/dist/types/models/api/IAuditUpdateRequest.d.ts +0 -19
- package/dist/types/models/authAuditEvent.d.ts +0 -49
- package/docs/reference/interfaces/IAuditCreateRequest.md +0 -11
- package/docs/reference/interfaces/IAuditGetRequest.md +0 -17
- package/docs/reference/interfaces/IAuditGetResponse.md +0 -11
- package/docs/reference/interfaces/IAuditQueryRequest.md +0 -65
- package/docs/reference/interfaces/IAuditQueryResponse.md +0 -23
- package/docs/reference/interfaces/IAuditRemoveRequest.md +0 -17
- package/docs/reference/interfaces/IAuditUpdateRequest.md +0 -25
- package/docs/reference/interfaces/IAuthenticationAuditComponent.md +0 -175
- package/docs/reference/interfaces/IAuthenticationAuditEntry.md +0 -91
- package/docs/reference/interfaces/IAuthenticationRateActionConfig.md +0 -19
- package/docs/reference/interfaces/IAuthenticationRateComponent.md +0 -165
- package/docs/reference/type-aliases/AuthAuditEvent.md +0 -5
- package/docs/reference/variables/AuthAuditEvent.md +0 -67
package/README.md
CHANGED
|
@@ -22,4 +22,4 @@ The changes between each version can be found in [docs/changelog.md](docs/change
|
|
|
22
22
|
|
|
23
23
|
## Origin
|
|
24
24
|
|
|
25
|
-
This package is derived from the original [iotaledger/twin-api](https://github.com/iotaledger/twin-api/tree/next/packages/api-auth-entity-storage-models) repository.
|
|
25
|
+
This package is derived from the original [iotaledger/twin-api-auth](https://github.com/iotaledger/twin-api-auth/tree/next/packages/api-auth-entity-storage-models) repository.
|
package/dist/es/index.js
CHANGED
|
@@ -7,26 +7,16 @@ export * from "./models/api/IAdminUserGetResponse.js";
|
|
|
7
7
|
export * from "./models/api/IAdminUserRemoveRequest.js";
|
|
8
8
|
export * from "./models/api/IAdminUserUpdatePasswordRequest.js";
|
|
9
9
|
export * from "./models/api/IAdminUserUpdateRequest.js";
|
|
10
|
-
export * from "./models/api/IAuditCreateRequest.js";
|
|
11
|
-
export * from "./models/api/IAuditGetRequest.js";
|
|
12
|
-
export * from "./models/api/IAuditGetResponse.js";
|
|
13
|
-
export * from "./models/api/IAuditQueryRequest.js";
|
|
14
|
-
export * from "./models/api/IAuditQueryResponse.js";
|
|
15
|
-
export * from "./models/api/IAuditRemoveRequest.js";
|
|
16
|
-
export * from "./models/api/IAuditUpdateRequest.js";
|
|
17
10
|
export * from "./models/api/ILoginRequest.js";
|
|
18
11
|
export * from "./models/api/ILoginResponse.js";
|
|
19
12
|
export * from "./models/api/ILogoutRequest.js";
|
|
13
|
+
export * from "./models/api/IPasswordPolicyResponse.js";
|
|
20
14
|
export * from "./models/api/IRefreshTokenRequest.js";
|
|
21
15
|
export * from "./models/api/IRefreshTokenResponse.js";
|
|
22
16
|
export * from "./models/api/IUpdatePasswordRequest.js";
|
|
23
|
-
export * from "./models/authAuditEvent.js";
|
|
24
17
|
export * from "./models/IAuthenticationAdminComponent.js";
|
|
25
|
-
export * from "./models/IAuthenticationAuditComponent.js";
|
|
26
|
-
export * from "./models/IAuthenticationAuditEntry.js";
|
|
27
18
|
export * from "./models/IAuthenticationComponent.js";
|
|
28
|
-
export * from "./models/IAuthenticationRateActionConfig.js";
|
|
29
|
-
export * from "./models/IAuthenticationRateComponent.js";
|
|
30
19
|
export * from "./models/IAuthenticationUser.js";
|
|
31
20
|
export * from "./models/IAuthenticationUserSecure.js";
|
|
21
|
+
export * from "./models/IPasswordOptions.js";
|
|
32
22
|
//# sourceMappingURL=index.js.map
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,yCAAyC,CAAC;AACxD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AACxD,cAAc,iDAAiD,CAAC;AAChE,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./models/api/IAdminUserCreateRequest.js\";\nexport * from \"./models/api/IAdminUserGetByIdentityRequest.js\";\nexport * from \"./models/api/IAdminUserGetRequest.js\";\nexport * from \"./models/api/IAdminUserGetResponse.js\";\nexport * from \"./models/api/IAdminUserRemoveRequest.js\";\nexport * from \"./models/api/IAdminUserUpdatePasswordRequest.js\";\nexport * from \"./models/api/IAdminUserUpdateRequest.js\";\nexport * from \"./models/api/ILoginRequest.js\";\nexport * from \"./models/api/ILoginResponse.js\";\nexport * from \"./models/api/ILogoutRequest.js\";\nexport * from \"./models/api/IPasswordPolicyResponse.js\";\nexport * from \"./models/api/IRefreshTokenRequest.js\";\nexport * from \"./models/api/IRefreshTokenResponse.js\";\nexport * from \"./models/api/IUpdatePasswordRequest.js\";\nexport * from \"./models/IAuthenticationAdminComponent.js\";\nexport * from \"./models/IAuthenticationComponent.js\";\nexport * from \"./models/IAuthenticationUser.js\";\nexport * from \"./models/IAuthenticationUserSecure.js\";\nexport * from \"./models/IPasswordOptions.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAuthenticationAdminComponent.js","
|
|
1
|
+
{"version":3,"file":"IAuthenticationAdminComponent.js","sources":["../../../src/models/IAuthenticationAdminComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@3sixty/core\";\nimport type { IAuthenticationUser } from \"./IAuthenticationUser.js\";\n\n/**\n * Contract definition for authentication admin component.\n */\nexport interface IAuthenticationAdminComponent extends IComponent {\n\t/**\n\t * Create a login for the user.\n\t * @param user The user to create.\n\t * @returns A promise that resolves when the user account has been created.\n\t */\n\tcreate(user: IAuthenticationUser & { password: string }): Promise<void>;\n\n\t/**\n\t * Update a login for the user.\n\t * @param user The user to update.\n\t * @returns A promise that resolves when the user account has been updated.\n\t */\n\tupdate(user: Partial<IAuthenticationUser>): Promise<void>;\n\n\t/**\n\t * Get a user by email.\n\t * @param email The email address of the user to get.\n\t * @returns The user details.\n\t */\n\tget(email: string): Promise<IAuthenticationUser>;\n\n\t/**\n\t * Get a user by identity.\n\t * @param identity The identity of the user to get.\n\t * @returns The user details.\n\t */\n\tgetByIdentity(identity: string): Promise<IAuthenticationUser>;\n\n\t/**\n\t * Remove a user.\n\t * @param email The email address of the user to remove.\n\t * @returns A promise that resolves when the user account has been removed.\n\t */\n\tremove(email: string): Promise<void>;\n\n\t/**\n\t * Update the user's password.\n\t * @param email The email address of the user to update.\n\t * @param newPassword The new password for the user.\n\t * @param currentPassword The current password, optional, if supplied will check against existing.\n\t * @returns A promise that resolves when the password has been updated.\n\t */\n\tupdatePassword(email: string, newPassword: string, currentPassword?: string): Promise<void>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAuthenticationComponent.js","
|
|
1
|
+
{"version":3,"file":"IAuthenticationComponent.js","sources":["../../../src/models/IAuthenticationComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@3sixty/core\";\nimport type { IPasswordOptions } from \"./IPasswordOptions.js\";\n\n/**\n * Contract definition for authentication component.\n */\nexport interface IAuthenticationComponent extends IComponent {\n\t/**\n\t * Perform a login for the user.\n\t * @param email The email address for the user.\n\t * @param password The password for the user.\n\t * @returns The authentication token for the user, if it uses a mechanism with public access.\n\t */\n\tlogin(\n\t\temail: string,\n\t\tpassword: string\n\t): Promise<{\n\t\ttoken?: string;\n\t\texpiry: number;\n\t}>;\n\n\t/**\n\t * Logout the current user.\n\t * @param token The token to logout, if it uses a mechanism with public access.\n\t * @returns A promise that resolves when the logout has been completed.\n\t */\n\tlogout(token?: string): Promise<void>;\n\n\t/**\n\t * Refresh the token.\n\t * @param token The token to refresh, if it uses a mechanism with public access.\n\t * @returns The refreshed token, if it uses a mechanism with public access.\n\t */\n\trefresh(token?: string): Promise<{\n\t\ttoken?: string;\n\t\texpiry: number;\n\t}>;\n\n\t/**\n\t * Update the user's password.\n\t * @param currentPassword The current password for the user.\n\t * @param newPassword The new password for the user.\n\t * @returns A promise that resolves when the password has been updated.\n\t */\n\tupdatePassword(currentPassword: string, newPassword: string): Promise<void>;\n\n\t/**\n\t * Get the password policy used for password validation.\n\t * @returns The password policy options.\n\t */\n\tpasswordPolicy(): Promise<IPasswordOptions>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAuthenticationUser.js","
|
|
1
|
+
{"version":3,"file":"IAuthenticationUser.js","sources":["../../../src/models/IAuthenticationUser.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Contract definition for authentication user.\n */\nexport interface IAuthenticationUser {\n\t/**\n\t * The user e-mail address.\n\t */\n\temail: string;\n\n\t/**\n\t * The user identity.\n\t */\n\tuserIdentity: string;\n\n\t/**\n\t * The users organization.\n\t */\n\torganizationIdentity: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAuthenticationUserSecure.js","
|
|
1
|
+
{"version":3,"file":"IAuthenticationUserSecure.js","sources":["../../../src/models/IAuthenticationUserSecure.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthenticationUser } from \"./IAuthenticationUser.js\";\n\n/**\n * Contract definition for authentication user.\n */\nexport interface IAuthenticationUserSecure extends IAuthenticationUser {\n\t/**\n\t * The encrypted password for the user.\n\t */\n\tpassword: string;\n\n\t/**\n\t * The salt for the password.\n\t */\n\tsalt: string;\n\n\t/**\n\t * The tenant ID associated with the user, optional in single tenant contexts.\n\t */\n\ttenantId: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPasswordOptions.js","sources":["../../../src/models/IPasswordOptions.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Password length validation options.\n */\nexport interface IPasswordOptions {\n\t/**\n\t * The minimum password length for validation.\n\t */\n\tminPasswordLength?: number;\n\n\t/**\n\t * The maximum password length for validation.\n\t */\n\tmaxPasswordLength?: number;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAdminUserCreateRequest.js","
|
|
1
|
+
{"version":3,"file":"IAdminUserCreateRequest.js","sources":["../../../../src/models/api/IAdminUserCreateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthenticationUser } from \"../IAuthenticationUser.js\";\n\n/**\n * Create a new user as an admin.\n */\nexport interface IAdminUserCreateRequest {\n\t/**\n\t * The body of the request.\n\t */\n\tbody: IAuthenticationUser & { password: string };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAdminUserGetByIdentityRequest.js","
|
|
1
|
+
{"version":3,"file":"IAdminUserGetByIdentityRequest.js","sources":["../../../../src/models/api/IAdminUserGetByIdentityRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Get a user as an admin.\n */\nexport interface IAdminUserGetByIdentityRequest {\n\t/**\n\t * The path parameters for the request.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The user identity.\n\t\t */\n\t\tidentity: string;\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAdminUserGetRequest.js","
|
|
1
|
+
{"version":3,"file":"IAdminUserGetRequest.js","sources":["../../../../src/models/api/IAdminUserGetRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Get a user as an admin.\n */\nexport interface IAdminUserGetRequest {\n\t/**\n\t * The path parameters for the request.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The user email.\n\t\t */\n\t\temail: string;\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAdminUserGetResponse.js","
|
|
1
|
+
{"version":3,"file":"IAdminUserGetResponse.js","sources":["../../../../src/models/api/IAdminUserGetResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthenticationUser } from \"../IAuthenticationUser.js\";\n\n/**\n * Get a user as an admin.\n */\nexport interface IAdminUserGetResponse {\n\t/**\n\t * The body of the request.\n\t */\n\tbody: IAuthenticationUser;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAdminUserRemoveRequest.js","
|
|
1
|
+
{"version":3,"file":"IAdminUserRemoveRequest.js","sources":["../../../../src/models/api/IAdminUserRemoveRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Remove a user as an admin.\n */\nexport interface IAdminUserRemoveRequest {\n\t/**\n\t * The path parameters for the request.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The user email.\n\t\t */\n\t\temail: string;\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAdminUserUpdatePasswordRequest.js","
|
|
1
|
+
{"version":3,"file":"IAdminUserUpdatePasswordRequest.js","sources":["../../../../src/models/api/IAdminUserUpdatePasswordRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Update a users password as an admin.\n */\nexport interface IAdminUserUpdatePasswordRequest {\n\t/**\n\t * The path parameters for the request.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The user email.\n\t\t */\n\t\temail: string;\n\t};\n\n\t/**\n\t * The body of the request.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The new password for the user.\n\t\t */\n\t\tnewPassword: string;\n\n\t\t/**\n\t\t * The current password for the user.\n\t\t */\n\t\tcurrentPassword?: string;\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAdminUserUpdateRequest.js","
|
|
1
|
+
{"version":3,"file":"IAdminUserUpdateRequest.js","sources":["../../../../src/models/api/IAdminUserUpdateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthenticationUser } from \"../IAuthenticationUser.js\";\n\n/**\n * Update a user as an admin.\n */\nexport interface IAdminUserUpdateRequest {\n\t/**\n\t * The path parameters for the request.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The user email.\n\t\t */\n\t\temail: string;\n\t};\n\n\t/**\n\t * The body of the request.\n\t */\n\tbody: Partial<Omit<IAuthenticationUser, \"email\">>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ILoginRequest.js","
|
|
1
|
+
{"version":3,"file":"ILoginRequest.js","sources":["../../../../src/models/api/ILoginRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Perform a login on the server.\n */\nexport interface ILoginRequest {\n\t/**\n\t * The login details.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The email address for the user.\n\t\t */\n\t\temail: string;\n\n\t\t/**\n\t\t * The password for the user.\n\t\t */\n\t\tpassword: string;\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ILoginResponse.js","
|
|
1
|
+
{"version":3,"file":"ILoginResponse.js","sources":["../../../../src/models/api/ILoginResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes } from \"@3sixty/web\";\n\n/**\n * Response from a login on the server.\n */\nexport interface ILoginResponse {\n\t/**\n\t * Response headers.\n\t */\n\theaders?: {\n\t\t/**\n\t\t * The cookie containing the auth token.\n\t\t */\n\t\t[HeaderTypes.SetCookie]?: string;\n\t};\n\n\t/**\n\t * The login response details.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The expiry time of the token.\n\t\t */\n\t\texpiry: number;\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ILogoutRequest.js","
|
|
1
|
+
{"version":3,"file":"ILogoutRequest.js","sources":["../../../../src/models/api/ILogoutRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Perform a logout on the auth token.\n */\nexport interface ILogoutRequest {\n\t/**\n\t * The logout token details.\n\t */\n\tbody?: {\n\t\t/**\n\t\t * The token to logout, if it uses a mechanism with public access.\n\t\t */\n\t\ttoken?: string;\n\t};\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPasswordPolicyResponse.js","sources":["../../../../src/models/api/IPasswordPolicyResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IPasswordOptions } from \"../IPasswordOptions.js\";\n\n/**\n * Get the password policy.\n */\nexport interface IPasswordPolicyResponse {\n\t/**\n\t * The body of the response.\n\t */\n\tbody: IPasswordOptions;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IRefreshTokenRequest.js","
|
|
1
|
+
{"version":3,"file":"IRefreshTokenRequest.js","sources":["../../../../src/models/api/IRefreshTokenRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Perform a refresh of the auth token.\n */\nexport interface IRefreshTokenRequest {\n\t/**\n\t * The refresh token details.\n\t */\n\tbody?: {\n\t\t/**\n\t\t * The token to refresh, if it uses a mechanism with public access.\n\t\t */\n\t\ttoken?: string;\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IRefreshTokenResponse.js","
|
|
1
|
+
{"version":3,"file":"IRefreshTokenResponse.js","sources":["../../../../src/models/api/IRefreshTokenResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes } from \"@3sixty/web\";\n\n/**\n * Response from a refresh on the auth token.\n */\nexport interface IRefreshTokenResponse {\n\t/**\n\t * Response headers.\n\t */\n\theaders?: {\n\t\t/**\n\t\t * The cookie containing the auth token.\n\t\t */\n\t\t[HeaderTypes.SetCookie]?: string;\n\t};\n\n\t/**\n\t * The refresh token details.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The expiry time of the token.\n\t\t */\n\t\texpiry: number;\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IUpdatePasswordRequest.js","
|
|
1
|
+
{"version":3,"file":"IUpdatePasswordRequest.js","sources":["../../../../src/models/api/IUpdatePasswordRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Update the current user's password.\n */\nexport interface IUpdatePasswordRequest {\n\t/**\n\t * The body of the request.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The current password for the user.\n\t\t */\n\t\tcurrentPassword: string;\n\n\t\t/**\n\t\t * The new password for the user.\n\t\t */\n\t\tnewPassword: string;\n\t};\n}\n"]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,25 +5,15 @@ export * from "./models/api/IAdminUserGetResponse.js";
|
|
|
5
5
|
export * from "./models/api/IAdminUserRemoveRequest.js";
|
|
6
6
|
export * from "./models/api/IAdminUserUpdatePasswordRequest.js";
|
|
7
7
|
export * from "./models/api/IAdminUserUpdateRequest.js";
|
|
8
|
-
export * from "./models/api/IAuditCreateRequest.js";
|
|
9
|
-
export * from "./models/api/IAuditGetRequest.js";
|
|
10
|
-
export * from "./models/api/IAuditGetResponse.js";
|
|
11
|
-
export * from "./models/api/IAuditQueryRequest.js";
|
|
12
|
-
export * from "./models/api/IAuditQueryResponse.js";
|
|
13
|
-
export * from "./models/api/IAuditRemoveRequest.js";
|
|
14
|
-
export * from "./models/api/IAuditUpdateRequest.js";
|
|
15
8
|
export * from "./models/api/ILoginRequest.js";
|
|
16
9
|
export * from "./models/api/ILoginResponse.js";
|
|
17
10
|
export * from "./models/api/ILogoutRequest.js";
|
|
11
|
+
export * from "./models/api/IPasswordPolicyResponse.js";
|
|
18
12
|
export * from "./models/api/IRefreshTokenRequest.js";
|
|
19
13
|
export * from "./models/api/IRefreshTokenResponse.js";
|
|
20
14
|
export * from "./models/api/IUpdatePasswordRequest.js";
|
|
21
|
-
export * from "./models/authAuditEvent.js";
|
|
22
15
|
export * from "./models/IAuthenticationAdminComponent.js";
|
|
23
|
-
export * from "./models/IAuthenticationAuditComponent.js";
|
|
24
|
-
export * from "./models/IAuthenticationAuditEntry.js";
|
|
25
16
|
export * from "./models/IAuthenticationComponent.js";
|
|
26
|
-
export * from "./models/IAuthenticationRateActionConfig.js";
|
|
27
|
-
export * from "./models/IAuthenticationRateComponent.js";
|
|
28
17
|
export * from "./models/IAuthenticationUser.js";
|
|
29
18
|
export * from "./models/IAuthenticationUserSecure.js";
|
|
19
|
+
export * from "./models/IPasswordOptions.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IComponent } from "@3sixty/core";
|
|
2
|
+
import type { IPasswordOptions } from "./IPasswordOptions.js";
|
|
2
3
|
/**
|
|
3
4
|
* Contract definition for authentication component.
|
|
4
5
|
*/
|
|
@@ -35,4 +36,9 @@ export interface IAuthenticationComponent extends IComponent {
|
|
|
35
36
|
* @returns A promise that resolves when the password has been updated.
|
|
36
37
|
*/
|
|
37
38
|
updatePassword(currentPassword: string, newPassword: string): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Get the password policy used for password validation.
|
|
41
|
+
* @returns The password policy options.
|
|
42
|
+
*/
|
|
43
|
+
passwordPolicy(): Promise<IPasswordOptions>;
|
|
38
44
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Password length validation options.
|
|
3
|
+
*/
|
|
4
|
+
export interface IPasswordOptions {
|
|
5
|
+
/**
|
|
6
|
+
* The minimum password length for validation.
|
|
7
|
+
*/
|
|
8
|
+
minPasswordLength?: number;
|
|
9
|
+
/**
|
|
10
|
+
* The maximum password length for validation.
|
|
11
|
+
*/
|
|
12
|
+
maxPasswordLength?: number;
|
|
13
|
+
}
|
package/docs/changelog.md
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.20.0-next.1](https://github.com/3sixtyglobal/api-auth/compare/api-auth-entity-storage-models-v0.20.0-next.0...api-auth-entity-storage-models-v0.20.0-next.1) (2026-10-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* authorization ([#3](https://github.com/3sixtyglobal/api-auth/issues/3)) ([5688693](https://github.com/3sixtyglobal/api-auth/commit/568869364065b9d2c82c5c17c81f07cbdc64ec8b))
|
|
9
|
+
* initial commit ([b9112fb](https://github.com/3sixtyglobal/api-auth/commit/b9112fb6994758b43effdde1b9e41435ff50fe50))
|
|
10
|
+
* publish packages under the [@3sixty](https://github.com/3sixty) namespace ([6c22482](https://github.com/3sixtyglobal/api-auth/commit/6c2248295620000807ff91087c3b1dfc9b018b31))
|
|
11
|
+
* updated ts compile ([83c72bd](https://github.com/3sixtyglobal/api-auth/commit/83c72bd5d2e9d81208b7a2755450d96fbbb04004))
|
package/docs/examples.md
CHANGED
|
@@ -47,8 +47,7 @@ const createRequest: IAdminUserCreateRequest = {
|
|
|
47
47
|
email: 'bob@example.org',
|
|
48
48
|
password: 'initial-password',
|
|
49
49
|
userIdentity: 'did:example:bob',
|
|
50
|
-
organizationIdentity: 'did:example:org'
|
|
51
|
-
scope: ['admin', 'auditor']
|
|
50
|
+
organizationIdentity: 'did:example:org'
|
|
52
51
|
}
|
|
53
52
|
};
|
|
54
53
|
|
|
@@ -57,18 +56,20 @@ const updateRequest: IAdminUserUpdateRequest = {
|
|
|
57
56
|
email: 'bob@example.org'
|
|
58
57
|
},
|
|
59
58
|
body: {
|
|
60
|
-
userIdentity: 'did:example:bob:ops'
|
|
61
|
-
scope: ['admin']
|
|
59
|
+
userIdentity: 'did:example:bob:ops'
|
|
62
60
|
}
|
|
63
61
|
};
|
|
64
62
|
|
|
65
|
-
console.log(
|
|
63
|
+
console.log(updateRequest.body.userIdentity); // did:example:bob:ops
|
|
66
64
|
```
|
|
67
65
|
|
|
68
66
|
## Authentication Responses
|
|
69
67
|
|
|
70
68
|
```typescript
|
|
71
|
-
import type {
|
|
69
|
+
import type {
|
|
70
|
+
ILoginResponse,
|
|
71
|
+
IPasswordPolicyResponse
|
|
72
|
+
} from '@3sixty/api-auth-entity-storage-models';
|
|
72
73
|
|
|
73
74
|
const loginResponse: ILoginResponse = {
|
|
74
75
|
body: {
|
|
@@ -76,5 +77,13 @@ const loginResponse: ILoginResponse = {
|
|
|
76
77
|
}
|
|
77
78
|
};
|
|
78
79
|
|
|
80
|
+
const passwordPolicyResponse: IPasswordPolicyResponse = {
|
|
81
|
+
body: {
|
|
82
|
+
minPasswordLength: 8,
|
|
83
|
+
maxPasswordLength: 128
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
79
87
|
console.log(loginResponse.body.expiry); // 3600
|
|
88
|
+
console.log(passwordPolicyResponse.body.minPasswordLength); // 8
|
|
80
89
|
```
|
package/docs/reference/index.md
CHANGED
|
@@ -3,13 +3,10 @@
|
|
|
3
3
|
## Interfaces
|
|
4
4
|
|
|
5
5
|
- [IAuthenticationAdminComponent](interfaces/IAuthenticationAdminComponent.md)
|
|
6
|
-
- [IAuthenticationAuditComponent](interfaces/IAuthenticationAuditComponent.md)
|
|
7
|
-
- [IAuthenticationAuditEntry](interfaces/IAuthenticationAuditEntry.md)
|
|
8
6
|
- [IAuthenticationComponent](interfaces/IAuthenticationComponent.md)
|
|
9
|
-
- [IAuthenticationRateActionConfig](interfaces/IAuthenticationRateActionConfig.md)
|
|
10
|
-
- [IAuthenticationRateComponent](interfaces/IAuthenticationRateComponent.md)
|
|
11
7
|
- [IAuthenticationUser](interfaces/IAuthenticationUser.md)
|
|
12
8
|
- [IAuthenticationUserSecure](interfaces/IAuthenticationUserSecure.md)
|
|
9
|
+
- [IPasswordOptions](interfaces/IPasswordOptions.md)
|
|
13
10
|
- [IAdminUserCreateRequest](interfaces/IAdminUserCreateRequest.md)
|
|
14
11
|
- [IAdminUserGetByIdentityRequest](interfaces/IAdminUserGetByIdentityRequest.md)
|
|
15
12
|
- [IAdminUserGetRequest](interfaces/IAdminUserGetRequest.md)
|
|
@@ -17,24 +14,10 @@
|
|
|
17
14
|
- [IAdminUserRemoveRequest](interfaces/IAdminUserRemoveRequest.md)
|
|
18
15
|
- [IAdminUserUpdatePasswordRequest](interfaces/IAdminUserUpdatePasswordRequest.md)
|
|
19
16
|
- [IAdminUserUpdateRequest](interfaces/IAdminUserUpdateRequest.md)
|
|
20
|
-
- [IAuditCreateRequest](interfaces/IAuditCreateRequest.md)
|
|
21
|
-
- [IAuditGetRequest](interfaces/IAuditGetRequest.md)
|
|
22
|
-
- [IAuditGetResponse](interfaces/IAuditGetResponse.md)
|
|
23
|
-
- [IAuditQueryRequest](interfaces/IAuditQueryRequest.md)
|
|
24
|
-
- [IAuditQueryResponse](interfaces/IAuditQueryResponse.md)
|
|
25
|
-
- [IAuditRemoveRequest](interfaces/IAuditRemoveRequest.md)
|
|
26
|
-
- [IAuditUpdateRequest](interfaces/IAuditUpdateRequest.md)
|
|
27
17
|
- [ILoginRequest](interfaces/ILoginRequest.md)
|
|
28
18
|
- [ILoginResponse](interfaces/ILoginResponse.md)
|
|
29
19
|
- [ILogoutRequest](interfaces/ILogoutRequest.md)
|
|
20
|
+
- [IPasswordPolicyResponse](interfaces/IPasswordPolicyResponse.md)
|
|
30
21
|
- [IRefreshTokenRequest](interfaces/IRefreshTokenRequest.md)
|
|
31
22
|
- [IRefreshTokenResponse](interfaces/IRefreshTokenResponse.md)
|
|
32
23
|
- [IUpdatePasswordRequest](interfaces/IUpdatePasswordRequest.md)
|
|
33
|
-
|
|
34
|
-
## Type Aliases
|
|
35
|
-
|
|
36
|
-
- [AuthAuditEvent](type-aliases/AuthAuditEvent.md)
|
|
37
|
-
|
|
38
|
-
## Variables
|
|
39
|
-
|
|
40
|
-
- [AuthAuditEvent](variables/AuthAuditEvent.md)
|
|
@@ -105,3 +105,17 @@ The new password for the user.
|
|
|
105
105
|
`Promise`\<`void`\>
|
|
106
106
|
|
|
107
107
|
A promise that resolves when the password has been updated.
|
|
108
|
+
|
|
109
|
+
***
|
|
110
|
+
|
|
111
|
+
### passwordPolicy() {#passwordpolicy}
|
|
112
|
+
|
|
113
|
+
> **passwordPolicy**(): `Promise`\<[`IPasswordOptions`](IPasswordOptions.md)\>
|
|
114
|
+
|
|
115
|
+
Get the password policy used for password validation.
|
|
116
|
+
|
|
117
|
+
#### Returns
|
|
118
|
+
|
|
119
|
+
`Promise`\<[`IPasswordOptions`](IPasswordOptions.md)\>
|
|
120
|
+
|
|
121
|
+
The password policy options.
|
|
@@ -44,18 +44,6 @@ The users organization.
|
|
|
44
44
|
|
|
45
45
|
***
|
|
46
46
|
|
|
47
|
-
### scope {#scope}
|
|
48
|
-
|
|
49
|
-
> **scope**: `string`[]
|
|
50
|
-
|
|
51
|
-
The scope assigned to the user, comma separated.
|
|
52
|
-
|
|
53
|
-
#### Inherited from
|
|
54
|
-
|
|
55
|
-
[`IAuthenticationUser`](IAuthenticationUser.md).[`scope`](IAuthenticationUser.md#scope)
|
|
56
|
-
|
|
57
|
-
***
|
|
58
|
-
|
|
59
47
|
### password {#password}
|
|
60
48
|
|
|
61
49
|
> **password**: `string`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Interface: IPasswordOptions
|
|
2
|
+
|
|
3
|
+
Password length validation options.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### minPasswordLength? {#minpasswordlength}
|
|
8
|
+
|
|
9
|
+
> `optional` **minPasswordLength?**: `number`
|
|
10
|
+
|
|
11
|
+
The minimum password length for validation.
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### maxPasswordLength? {#maxpasswordlength}
|
|
16
|
+
|
|
17
|
+
> `optional` **maxPasswordLength?**: `number`
|
|
18
|
+
|
|
19
|
+
The maximum password length for validation.
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@3sixty/api-auth-entity-storage-models",
|
|
3
|
-
"version": "0.20.0-next.
|
|
3
|
+
"version": "0.20.0-next.1",
|
|
4
4
|
"description": "Contracts for authentication flows and admin user management with entity storage.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/3sixtyglobal/api.git",
|
|
7
|
+
"url": "git+https://github.com/3sixtyglobal/api-auth.git",
|
|
8
8
|
"directory": "packages/api-auth-entity-storage-models"
|
|
9
9
|
},
|
|
10
10
|
"author": "martyn.janes@iota.org",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"schemas"
|
|
50
50
|
],
|
|
51
51
|
"bugs": {
|
|
52
|
-
"url": "git+https://github.com/3sixtyglobal/api/issues"
|
|
52
|
+
"url": "git+https://github.com/3sixtyglobal/api-auth/issues"
|
|
53
53
|
},
|
|
54
54
|
"homepage": "https://3sixty.global"
|
|
55
55
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAuthenticationAuditComponent.js","sourceRoot":"","sources":["../../../src/models/IAuthenticationAuditComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@3sixty/core\";\nimport type { AuthAuditEvent } from \"./authAuditEvent.js\";\nimport type { IAuthenticationAuditEntry } from \"./IAuthenticationAuditEntry.js\";\n\n/**\n * Contract definition for authentication audit component.\n */\nexport interface IAuthenticationAuditComponent extends IComponent {\n\t/**\n\t * Create a new audit entry.\n\t * @param entry The audit entry to be logged.\n\t * @returns The unique identifier of the created audit entry.\n\t */\n\tcreate(entry: Omit<IAuthenticationAuditEntry, \"id\" | \"dateCreated\">): Promise<string>;\n\n\t/**\n\t * Get an audit entry by id.\n\t * @param id The unique identifier of the audit entry.\n\t * @returns The audit entry.\n\t */\n\tget(id: string): Promise<IAuthenticationAuditEntry>;\n\n\t/**\n\t * Update an audit entry.\n\t * @param id The unique identifier of the audit entry to update.\n\t * @param entry The fields to update on the audit entry.\n\t * @returns A promise that resolves when the audit entry has been updated.\n\t */\n\tupdate(\n\t\tid: string,\n\t\tentry: Partial<Omit<IAuthenticationAuditEntry, \"id\" | \"dateCreated\">>\n\t): Promise<void>;\n\n\t/**\n\t * Remove an audit entry.\n\t * @param id The unique identifier of the audit entry to remove.\n\t * @returns A promise that resolves when the audit entry has been removed.\n\t */\n\tremove(id: string): Promise<void>;\n\n\t/**\n\t * Query the audit entries.\n\t * @param options The query options.\n\t * @param options.actorId The actor identifier to filter the audit entries, optional.\n\t * @param options.organizationId The organization identifier to filter the audit entries, optional.\n\t * @param options.tenantId The tenant identifier to filter the audit entries, optional.\n\t * @param options.nodeId The node identifier to filter the audit entries, optional.\n\t * @param options.event The audit event to filter the audit entries, optional.\n\t * @param options.startDate The start date to filter the audit entries, optional.\n\t * @param options.endDate The end date to filter the audit entries, optional.\n\t * @param cursor The cursor for pagination.\n\t * @param limit The maximum number of entries to return.\n\t * @returns The audit entries.\n\t */\n\tquery(\n\t\toptions?: {\n\t\t\tactorId?: string;\n\t\t\torganizationId?: string;\n\t\t\ttenantId?: string;\n\t\t\tnodeId?: string;\n\t\t\tevent?: AuthAuditEvent | string;\n\t\t\tstartDate?: string;\n\t\t\tendDate?: string;\n\t\t},\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\tentries: IAuthenticationAuditEntry[];\n\t\tcursor?: string;\n\t}>;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAuthenticationAuditEntry.js","sourceRoot":"","sources":["../../../src/models/IAuthenticationAuditEntry.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { AuthAuditEvent } from \"./authAuditEvent.js\";\n\n/**\n * Contract definition for authentication audit entry.\n */\nexport interface IAuthenticationAuditEntry {\n\t/**\n\t * The unique identifier for the audit entry.\n\t */\n\tid: string;\n\n\t/**\n\t * The audit event that occurred.\n\t */\n\tevent: AuthAuditEvent | string;\n\n\t/**\n\t * The timestamp of the audit entry in ISO 8601 format.\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * The actor identifier, could be e-mail, username, or other unique identifier.\n\t */\n\tactorId?: string;\n\n\t/**\n\t * The node identifier associated with the audit entry, if applicable.\n\t */\n\tnodeId?: string;\n\n\t/**\n\t * The organization identifier associated with the audit entry, if applicable.\n\t */\n\torganizationId?: string;\n\n\t/**\n\t * The tenant identifier associated with the audit entry, if applicable.\n\t */\n\ttenantId?: string;\n\n\t/**\n\t * The hashed IP addresses of the client.\n\t */\n\tipAddressHashes?: string[];\n\n\t/**\n\t * The user agent string of the client.\n\t */\n\tuserAgent?: string;\n\n\t/**\n\t * The correlation ID for request tracing.\n\t */\n\tcorrelationId?: string;\n\n\t/**\n\t * Additional data related to the audit entry, such as IP address, user agent, etc.\n\t */\n\tdata?: unknown;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAuthenticationRateActionConfig.js","sourceRoot":"","sources":["../../../src/models/IAuthenticationRateActionConfig.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Configuration for an authentication rate limited action.\n */\nexport interface IAuthenticationRateActionConfig {\n\t/**\n\t * Maximum number of failed attempts allowed per window.\n\t */\n\tmaxAttempts: number;\n\n\t/**\n\t * Rate limit window duration in minutes.\n\t */\n\twindowMinutes: number;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAuthenticationRateComponent.js","sourceRoot":"","sources":["../../../src/models/IAuthenticationRateComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@3sixty/core\";\nimport type { IAuthenticationRateActionConfig } from \"./IAuthenticationRateActionConfig.js\";\n\n/**\n * Contract definition for authentication rate component.\n */\nexport interface IAuthenticationRateComponent extends IComponent {\n\t/**\n\t * The service needs to be started when the application is initialized.\n\t * @param nodeLoggingComponentType The node logging component type.\n\t * @returns A promise that resolves when the service has been started.\n\t */\n\tstart(nodeLoggingComponentType?: string): Promise<void>;\n\n\t/**\n\t * The component needs to be stopped when the node is closed.\n\t * @param nodeLoggingComponentType The node logging component type.\n\t * @returns A promise that resolves when the service has been stopped.\n\t */\n\tstop(nodeLoggingComponentType?: string): Promise<void>;\n\n\t/**\n\t * Register or update rate-limit configuration for an action.\n\t * @param action The action name.\n\t * @param config The action configuration.\n\t * @returns A promise that resolves when the action configuration has been stored.\n\t */\n\tregisterAction(action: string, config: IAuthenticationRateActionConfig): Promise<void>;\n\n\t/**\n\t * Unregister rate-limit configuration for an action.\n\t * @param action The action name.\n\t * @returns A promise that resolves when the action configuration has been removed.\n\t */\n\tunregisterAction(action: string): Promise<void>;\n\n\t/**\n\t * Check the authentication rate for a given action and identifier.\n\t * @param action The action to be checked.\n\t * @param identifier The identifier to be checked.\n\t * @returns The result of the rate check.\n\t */\n\tcheck(action: string, identifier: string): Promise<string>;\n\n\t/**\n\t * Clear the authentication rate entry for the given action and identifier.\n\t * @param action The action to clear.\n\t * @param identifier The identifier to clear.\n\t * @returns A promise that resolves when the rate entry has been removed.\n\t */\n\tclear(action: string, identifier: string): Promise<void>;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAuditCreateRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IAuditCreateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthenticationAuditEntry } from \"../IAuthenticationAuditEntry.js\";\n\n/**\n * Create an authentication audit entry.\n */\nexport interface IAuditCreateRequest {\n\t/**\n\t * The body of the request.\n\t */\n\tbody: Omit<IAuthenticationAuditEntry, \"id\" | \"dateCreated\">;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAuditGetRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IAuditGetRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Get an authentication audit entry by id.\n */\nexport interface IAuditGetRequest {\n\t/**\n\t * The path parameters for the request.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The audit entry id.\n\t\t */\n\t\tid: string;\n\t};\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAuditGetResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IAuditGetResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthenticationAuditEntry } from \"../IAuthenticationAuditEntry.js\";\n\n/**\n * Response from getting an authentication audit entry.\n */\nexport interface IAuditGetResponse {\n\t/**\n\t * The response body.\n\t */\n\tbody: IAuthenticationAuditEntry;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAuditQueryRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IAuditQueryRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { AuthAuditEvent } from \"../authAuditEvent.js\";\n\n/**\n * Query authentication audit entries.\n */\nexport interface IAuditQueryRequest {\n\t/**\n\t * The query parameters for the request.\n\t */\n\tquery?: {\n\t\t/**\n\t\t * The actor identifier to filter by.\n\t\t */\n\t\tactorId?: string;\n\n\t\t/**\n\t\t * The organization identifier to filter by.\n\t\t */\n\t\torganizationId?: string;\n\n\t\t/**\n\t\t * The tenant identifier to filter by.\n\t\t */\n\t\ttenantId?: string;\n\n\t\t/**\n\t\t * The node identifier to filter by.\n\t\t */\n\t\tnodeId?: string;\n\n\t\t/**\n\t\t * The event to filter by.\n\t\t */\n\t\tevent?: AuthAuditEvent | string;\n\n\t\t/**\n\t\t * The inclusive start date for filtering, in ISO 8601 format.\n\t\t */\n\t\tstartDate?: string;\n\n\t\t/**\n\t\t * The inclusive end date for filtering, in ISO 8601 format.\n\t\t */\n\t\tendDate?: string;\n\n\t\t/**\n\t\t * The pagination cursor.\n\t\t */\n\t\tcursor?: string;\n\n\t\t/**\n\t\t * The maximum number of results to return.\n\t\t */\n\t\tlimit?: string;\n\t};\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAuditQueryResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IAuditQueryResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthenticationAuditEntry } from \"../IAuthenticationAuditEntry.js\";\n\n/**\n * Response from querying authentication audit entries.\n */\nexport interface IAuditQueryResponse {\n\t/**\n\t * The response body.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The returned audit entries.\n\t\t */\n\t\tentries: IAuthenticationAuditEntry[];\n\n\t\t/**\n\t\t * The cursor to retrieve the next page, if any.\n\t\t */\n\t\tcursor?: string;\n\t};\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAuditRemoveRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IAuditRemoveRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Remove an authentication audit entry.\n */\nexport interface IAuditRemoveRequest {\n\t/**\n\t * The path parameters for the request.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The audit entry id.\n\t\t */\n\t\tid: string;\n\t};\n}\n"]}
|