@3sixty/api-auth-entity-storage-service 0.0.0-stage → 0.20.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +24 -2
- package/dist/es/entities/authenticationUser.js +61 -0
- package/dist/es/entities/authenticationUser.js.map +1 -0
- package/dist/es/entities/authenticationUserV0.js +69 -0
- package/dist/es/entities/authenticationUserV0.js.map +1 -0
- package/dist/es/index.js +21 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IAuthHeaderProcessorConfig.js +4 -0
- package/dist/es/models/IAuthHeaderProcessorConfig.js.map +1 -0
- package/dist/es/models/IAuthHeaderProcessorConstructorOptions.js +2 -0
- package/dist/es/models/IAuthHeaderProcessorConstructorOptions.js.map +1 -0
- package/dist/es/models/IAuthTokenContext.js +4 -0
- package/dist/es/models/IAuthTokenContext.js.map +1 -0
- package/dist/es/models/IEntityStorageAuthenticationAdminServiceConfig.js +4 -0
- package/dist/es/models/IEntityStorageAuthenticationAdminServiceConfig.js.map +1 -0
- package/dist/es/models/IEntityStorageAuthenticationAdminServiceConstructorOptions.js +2 -0
- package/dist/es/models/IEntityStorageAuthenticationAdminServiceConstructorOptions.js.map +1 -0
- package/dist/es/models/IEntityStorageAuthenticationServiceConfig.js +2 -0
- package/dist/es/models/IEntityStorageAuthenticationServiceConfig.js.map +1 -0
- package/dist/es/models/IEntityStorageAuthenticationServiceConstructorOptions.js +2 -0
- package/dist/es/models/IEntityStorageAuthenticationServiceConstructorOptions.js.map +1 -0
- package/dist/es/processors/authHeaderProcessor.js +272 -0
- package/dist/es/processors/authHeaderProcessor.js.map +1 -0
- package/dist/es/restEntryPoints.js +20 -0
- package/dist/es/restEntryPoints.js.map +1 -0
- package/dist/es/routes/entityStorageAuthenticationAdminRoutes.js +375 -0
- package/dist/es/routes/entityStorageAuthenticationAdminRoutes.js.map +1 -0
- package/dist/es/routes/entityStorageAuthenticationRoutes.js +291 -0
- package/dist/es/routes/entityStorageAuthenticationRoutes.js.map +1 -0
- package/dist/es/schema.js +13 -0
- package/dist/es/schema.js.map +1 -0
- package/dist/es/services/entityStorageAuthenticationAdminService.js +324 -0
- package/dist/es/services/entityStorageAuthenticationAdminService.js.map +1 -0
- package/dist/es/services/entityStorageAuthenticationService.js +338 -0
- package/dist/es/services/entityStorageAuthenticationService.js.map +1 -0
- package/dist/es/utils/passwordHelper.js +60 -0
- package/dist/es/utils/passwordHelper.js.map +1 -0
- package/dist/es/utils/tokenHelper.js +121 -0
- package/dist/es/utils/tokenHelper.js.map +1 -0
- package/dist/types/entities/authenticationUser.d.ts +29 -0
- package/dist/types/entities/authenticationUserV0.d.ts +33 -0
- package/dist/types/index.d.ts +18 -0
- package/dist/types/models/IAuthHeaderProcessorConfig.d.ts +38 -0
- package/dist/types/models/IAuthHeaderProcessorConstructorOptions.d.ts +25 -0
- package/dist/types/models/IAuthTokenContext.d.ts +30 -0
- package/dist/types/models/IEntityStorageAuthenticationAdminServiceConfig.d.ts +25 -0
- package/dist/types/models/IEntityStorageAuthenticationAdminServiceConstructorOptions.d.ts +25 -0
- package/dist/types/models/IEntityStorageAuthenticationServiceConfig.d.ts +41 -0
- package/dist/types/models/IEntityStorageAuthenticationServiceConstructorOptions.d.ts +35 -0
- package/dist/types/processors/authHeaderProcessor.d.ts +57 -0
- package/dist/types/restEntryPoints.d.ts +5 -0
- package/dist/types/routes/entityStorageAuthenticationAdminRoutes.d.ts +62 -0
- package/dist/types/routes/entityStorageAuthenticationRoutes.d.ts +53 -0
- package/dist/types/schema.d.ts +4 -0
- package/dist/types/services/entityStorageAuthenticationAdminService.d.ts +69 -0
- package/dist/types/services/entityStorageAuthenticationService.d.ts +70 -0
- package/dist/types/utils/passwordHelper.d.ts +27 -0
- package/dist/types/utils/tokenHelper.d.ts +51 -0
- package/docs/changelog.md +19 -0
- package/docs/examples.md +94 -0
- package/docs/open-api/spec.json +1344 -0
- package/docs/reference/classes/AuthHeaderProcessor.md +197 -0
- package/docs/reference/classes/AuthenticationUser.md +61 -0
- package/docs/reference/classes/AuthenticationUserV0.md +69 -0
- package/docs/reference/classes/EntityStorageAuthenticationAdminService.md +237 -0
- package/docs/reference/classes/EntityStorageAuthenticationService.md +239 -0
- package/docs/reference/classes/PasswordHelper.md +74 -0
- package/docs/reference/classes/TokenHelper.md +163 -0
- package/docs/reference/functions/authenticationAdminCreateUser.md +37 -0
- package/docs/reference/functions/authenticationAdminGetUser.md +31 -0
- package/docs/reference/functions/authenticationAdminGetUserByIdentity.md +31 -0
- package/docs/reference/functions/authenticationAdminRemoveUser.md +31 -0
- package/docs/reference/functions/authenticationAdminUpdateUser.md +31 -0
- package/docs/reference/functions/authenticationAdminUpdateUserPassword.md +31 -0
- package/docs/reference/functions/authenticationLogin.md +31 -0
- package/docs/reference/functions/authenticationLogout.md +31 -0
- package/docs/reference/functions/authenticationPasswordPolicy.md +31 -0
- package/docs/reference/functions/authenticationRefreshToken.md +31 -0
- package/docs/reference/functions/authenticationUpdatePassword.md +31 -0
- package/docs/reference/functions/generateRestRoutesAuthentication.md +25 -0
- package/docs/reference/functions/generateRestRoutesAuthenticationAdmin.md +25 -0
- package/docs/reference/functions/initSchema.md +9 -0
- package/docs/reference/index.md +44 -0
- package/docs/reference/interfaces/IAuthHeaderProcessorConfig.md +85 -0
- package/docs/reference/interfaces/IAuthHeaderProcessorConstructorOptions.md +53 -0
- package/docs/reference/interfaces/IAuthTokenContext.md +52 -0
- package/docs/reference/interfaces/IEntityStorageAuthenticationAdminServiceConfig.md +59 -0
- package/docs/reference/interfaces/IEntityStorageAuthenticationAdminServiceConstructorOptions.md +53 -0
- package/docs/reference/interfaces/IEntityStorageAuthenticationServiceConfig.md +101 -0
- package/docs/reference/interfaces/IEntityStorageAuthenticationServiceConstructorOptions.md +81 -0
- package/docs/reference/variables/restEntryPoints.md +5 -0
- package/docs/reference/variables/tagsAuthentication.md +5 -0
- package/docs/reference/variables/tagsAuthenticationAdmin.md +5 -0
- package/locales/en.json +37 -0
- package/package.json +63 -5
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Interface: IEntityStorageAuthenticationServiceConstructorOptions
|
|
2
|
+
|
|
3
|
+
Options for the EntityStorageAuthenticationService constructor.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### userEntityStorageType? {#userentitystoragetype}
|
|
8
|
+
|
|
9
|
+
> `optional` **userEntityStorageType?**: `string`
|
|
10
|
+
|
|
11
|
+
The entity storage for the users.
|
|
12
|
+
|
|
13
|
+
#### Default
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
authentication-user
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### vaultConnectorType? {#vaultconnectortype}
|
|
22
|
+
|
|
23
|
+
> `optional` **vaultConnectorType?**: `string`
|
|
24
|
+
|
|
25
|
+
The vault for the private keys.
|
|
26
|
+
|
|
27
|
+
#### Default
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
vault
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### authenticationAuditServiceType? {#authenticationauditservicetype}
|
|
36
|
+
|
|
37
|
+
> `optional` **authenticationAuditServiceType?**: `string`
|
|
38
|
+
|
|
39
|
+
The audit service.
|
|
40
|
+
|
|
41
|
+
#### Default
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
authentication-audit
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
***
|
|
48
|
+
|
|
49
|
+
### authenticationRateServiceType? {#authenticationrateservicetype}
|
|
50
|
+
|
|
51
|
+
> `optional` **authenticationRateServiceType?**: `string`
|
|
52
|
+
|
|
53
|
+
The rate service.
|
|
54
|
+
|
|
55
|
+
#### Default
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
authentication-rate
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
***
|
|
62
|
+
|
|
63
|
+
### tenantAdminComponentType? {#tenantadmincomponenttype}
|
|
64
|
+
|
|
65
|
+
> `optional` **tenantAdminComponentType?**: `string`
|
|
66
|
+
|
|
67
|
+
The component to retrieve tenant information.
|
|
68
|
+
|
|
69
|
+
#### Default
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
tenant-admin
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
***
|
|
76
|
+
|
|
77
|
+
### config? {#config}
|
|
78
|
+
|
|
79
|
+
> `optional` **config?**: [`IEntityStorageAuthenticationServiceConfig`](IEntityStorageAuthenticationServiceConfig.md)
|
|
80
|
+
|
|
81
|
+
The configuration for the authentication.
|
package/locales/en.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"error": {
|
|
3
|
+
"entityStorageAuthenticationService": {
|
|
4
|
+
"loginFailed": "Login failed",
|
|
5
|
+
"userNotFound": "The user with the specified e-mail could not be found",
|
|
6
|
+
"passwordMismatch": "The password does not match the user's password",
|
|
7
|
+
"nodeIdNotSet": "The node ID has not been set"
|
|
8
|
+
},
|
|
9
|
+
"entityStorageAuthenticationAdminService": {
|
|
10
|
+
"userExists": "The user with the specified e-mail already exists",
|
|
11
|
+
"createUserFailed": "Creating the user failed",
|
|
12
|
+
"getUserFailed": "Getting the user failed",
|
|
13
|
+
"updateUserFailed": "Updating the user failed",
|
|
14
|
+
"removeUserFailed": "Removing the user failed",
|
|
15
|
+
"updatePasswordFailed": "Updating the user's password failed",
|
|
16
|
+
"userNotFound": "The user with the specified e-mail could not be found \"{notFoundId}\"",
|
|
17
|
+
"insufficientRoleForEscalatedTarget": "Caller does not hold the required role \"{roleName}\" to modify an account with escalated privilege."
|
|
18
|
+
},
|
|
19
|
+
"authHeaderProcessor": {
|
|
20
|
+
"nodeIdNotSet": "The node ID has not been set"
|
|
21
|
+
},
|
|
22
|
+
"passwordHelper": {
|
|
23
|
+
"currentPasswordMismatch": "The current password is incorrect"
|
|
24
|
+
},
|
|
25
|
+
"tokenHelper": {
|
|
26
|
+
"missing": "The JSON Web token could not be found in the authorization header",
|
|
27
|
+
"headerKeyIdMismatch": "The JSON Web token key identifier does not match the expected signing key",
|
|
28
|
+
"payloadIssuerMismatch": "The JSON Web token issuer does not match the expected signing key",
|
|
29
|
+
"payloadMissingSubject": "The JSON Web token payload does not contain a subject",
|
|
30
|
+
"payloadMissingOrganization": "The JSON Web token payload does not contain an organization",
|
|
31
|
+
"expired": "The JSON Web token has expired",
|
|
32
|
+
"userNotVerified": "The user associated with the JSON Web token could not be verified",
|
|
33
|
+
"organizationNotVerified": "The organization associated with the JSON Web token could not be verified",
|
|
34
|
+
"tenantNotVerified": "The tenant associated with the JSON Web token could not be verified"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,64 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@3sixty/api-auth-entity-storage-service",
|
|
3
|
+
"version": "0.20.0-next.1",
|
|
4
|
+
"description": "Authentication service implementation and REST routes backed by entity storage.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/3sixtyglobal/api-auth.git",
|
|
8
|
+
"directory": "packages/api-auth-entity-storage-service"
|
|
9
|
+
},
|
|
10
|
+
"author": "martyn.janes@iota.org",
|
|
11
|
+
"license": "Apache-2.0",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=24.0.0"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@3sixty/api-auth-entity-storage-models": "0.20.0-next.1",
|
|
18
|
+
"@3sixty/api-auth-models": "0.20.0-next.1",
|
|
19
|
+
"@3sixty/api-models": "next",
|
|
20
|
+
"@3sixty/authorization-models": "next",
|
|
21
|
+
"@3sixty/context": "next",
|
|
22
|
+
"@3sixty/core": "next",
|
|
23
|
+
"@3sixty/crypto": "next",
|
|
24
|
+
"@3sixty/entity": "next",
|
|
25
|
+
"@3sixty/entity-storage-models": "next",
|
|
26
|
+
"@3sixty/nameof": "next",
|
|
27
|
+
"@3sixty/vault-models": "next",
|
|
28
|
+
"@3sixty/web": "next"
|
|
29
|
+
},
|
|
30
|
+
"main": "./dist/es/index.js",
|
|
31
|
+
"types": "./dist/types/index.d.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/types/index.d.ts",
|
|
35
|
+
"import": "./dist/es/index.js",
|
|
36
|
+
"default": "./dist/es/index.js"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist/es",
|
|
41
|
+
"dist/types",
|
|
42
|
+
"locales",
|
|
43
|
+
"docs"
|
|
44
|
+
],
|
|
45
|
+
"keywords": [
|
|
46
|
+
"twin",
|
|
47
|
+
"trade",
|
|
48
|
+
"iota",
|
|
49
|
+
"framework",
|
|
50
|
+
"blockchain",
|
|
51
|
+
"api",
|
|
52
|
+
"entity",
|
|
53
|
+
"storage",
|
|
54
|
+
"persistence",
|
|
55
|
+
"database",
|
|
56
|
+
"service",
|
|
57
|
+
"microservice",
|
|
58
|
+
"business-logic"
|
|
59
|
+
],
|
|
60
|
+
"bugs": {
|
|
61
|
+
"url": "git+https://github.com/3sixtyglobal/api-auth/issues"
|
|
62
|
+
},
|
|
63
|
+
"homepage": "https://3sixty.global"
|
|
64
|
+
}
|