@3sixty/engine-server-types 0.20.0-next.7 → 0.20.0-next.8
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/dist/es/components/authentication.js +15 -0
- package/dist/es/components/authentication.js.map +1 -1
- package/dist/es/components/authenticationProvider.js +11 -2
- package/dist/es/components/authenticationProvider.js.map +1 -1
- package/dist/es/models/config/authenticationProviderConfig.js.map +1 -1
- package/dist/es/models/types/authenticationAccountAdminComponentType.js +0 -1
- package/dist/es/models/types/authenticationAccountAdminComponentType.js.map +1 -1
- package/dist/es/models/types/authenticationAccountComponentType.js +0 -1
- package/dist/es/models/types/authenticationAccountComponentType.js.map +1 -1
- package/dist/es/models/types/authenticationAdminComponentType.js +0 -1
- package/dist/es/models/types/authenticationAdminComponentType.js.map +1 -1
- package/dist/es/models/types/authenticationAuditComponentType.js +0 -1
- package/dist/es/models/types/authenticationAuditComponentType.js.map +1 -1
- package/dist/es/models/types/authenticationComponentType.js +0 -1
- package/dist/es/models/types/authenticationComponentType.js.map +1 -1
- package/dist/es/models/types/authenticationProviderType.js +5 -2
- package/dist/es/models/types/authenticationProviderType.js.map +1 -1
- package/dist/es/models/types/authenticationRateComponentType.js +0 -1
- package/dist/es/models/types/authenticationRateComponentType.js.map +1 -1
- package/dist/es/models/types/featureComponentType.js +0 -1
- package/dist/es/models/types/featureComponentType.js.map +1 -1
- package/dist/es/models/types/informationComponentType.js +0 -1
- package/dist/es/models/types/informationComponentType.js.map +1 -1
- package/dist/es/models/types/mimeTypeProcessorType.js +0 -1
- package/dist/es/models/types/mimeTypeProcessorType.js.map +1 -1
- package/dist/es/models/types/oauthComponentType.js +0 -1
- package/dist/es/models/types/oauthComponentType.js.map +1 -1
- package/dist/es/models/types/organizationComponentType.js +0 -1
- package/dist/es/models/types/organizationComponentType.js.map +1 -1
- package/dist/es/models/types/organizationRequestAdminComponentType.js +0 -1
- package/dist/es/models/types/organizationRequestAdminComponentType.js.map +1 -1
- package/dist/es/models/types/restRouteProcessorType.js +0 -1
- package/dist/es/models/types/restRouteProcessorType.js.map +1 -1
- package/dist/es/models/types/socketRouteProcessorType.js +0 -1
- package/dist/es/models/types/socketRouteProcessorType.js.map +1 -1
- package/dist/es/models/types/webServerType.js +0 -1
- package/dist/es/models/types/webServerType.js.map +1 -1
- package/dist/types/components/authentication.d.ts +8 -0
- package/dist/types/models/config/authenticationProviderConfig.d.ts +5 -1
- package/dist/types/models/types/authenticationProviderType.d.ts +5 -1
- package/docs/changelog.md +15 -0
- package/docs/examples.md +6 -2
- package/docs/reference/functions/initialiseAuthenticationAuthorizationCodeEntityStorage.md +30 -0
- package/docs/reference/index.md +1 -0
- package/docs/reference/type-aliases/AuthenticationProviderConfig.md +1 -1
- package/docs/reference/variables/AuthenticationProviderType.md +8 -2
- package/package.json +5 -3
|
@@ -35,6 +35,20 @@ export function initialiseAuthenticationPasswordResetEntityStorage(engineCore, c
|
|
|
35
35
|
ContextIdKeys.Tenant
|
|
36
36
|
]));
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Initialise the entity storage of the OAuth 2.0 authorization codes of password accounts,
|
|
40
|
+
* partitioned like the accounts they belong to.
|
|
41
|
+
* @param engineCore The engine core.
|
|
42
|
+
* @param context The context for the engine.
|
|
43
|
+
* @param storageType The configured storage type.
|
|
44
|
+
*/
|
|
45
|
+
export function initialiseAuthenticationAuthorizationCodeEntityStorage(engineCore, context, storageType) {
|
|
46
|
+
initSchemaAuthEntityStorage();
|
|
47
|
+
initialiseEntityStorageConnector(engineCore, context, storageType, "AuthenticationAuthorizationCode", ContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [
|
|
48
|
+
ContextIdKeys.Node,
|
|
49
|
+
ContextIdKeys.Tenant
|
|
50
|
+
]));
|
|
51
|
+
}
|
|
38
52
|
/**
|
|
39
53
|
* Initialise the authentication component.
|
|
40
54
|
* @param engineCore The engine core.
|
|
@@ -49,6 +63,7 @@ export function initialiseAuthenticationComponent(engineCore, context, instanceC
|
|
|
49
63
|
createComponent = (createConfig) => {
|
|
50
64
|
initialiseAuthenticationUserEntityStorage(engineCore, context, createConfig.options?.userEntityStorageType);
|
|
51
65
|
initialiseAuthenticationPasswordResetEntityStorage(engineCore, context, createConfig.options?.passwordResetEntityStorageType);
|
|
66
|
+
initialiseAuthenticationAuthorizationCodeEntityStorage(engineCore, context, createConfig.options?.authorizationCodeEntityStorageType);
|
|
52
67
|
return new EntityStorageAuthenticationService(EngineTypeHelper.mergeConfig({
|
|
53
68
|
vaultConnectorType: engineCore.getRegisteredInstanceType("vaultConnector"),
|
|
54
69
|
tenantAdminComponentType: engineCore.getRegisteredInstanceTypeOptional("tenantAdminComponent"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication.js","sources":["../../../src/components/authentication.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,mCAAmC;AACnC,uCAAuC;AACvC,OAAO,EAAE,qCAAqC,EAAE,MAAM,6CAA6C,CAAC;AACpG,OAAO,EACN,kCAAkC,EAClC,UAAU,IAAI,2BAA2B,EAGzC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,cAAc,CAAC;AAMjE,OAAO,EAAE,gBAAgB,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAI1F,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAE7F;;;;;;GAMG;AACH,MAAM,UAAU,yCAAyC,CACxD,UAA4C,EAC5C,OAAgD,EAChD,WAA+B;IAE/B,2BAA2B,EAAE,CAAC;IAC9B,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,WAAW,EACX,oBAAoB,EACpB,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE;QACpE,aAAa,CAAC,IAAI;QAClB,aAAa,CAAC,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EACzB,UAAU,CAAC,yBAAyB,CAAC,wBAAwB,CAAC;gBAC/D,qCAAqC,EAAE,UAAU,CAAC,yBAAyB,CAC1E,mCAAmC,CACnC;gBACD,sBAAsB,EAAE,UAAU,CAAC,yBAAyB,CAAC,oBAAoB,CAAC;gBAClF,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CACzD,SAAS,EACT,oCAAoC,CACpC;gBACD,0BAA0B,EACzB,UAAU,CAAC,yBAAyB,CAAC,wBAAwB,CAAC;gBAC/D,qBAAqB,EAAE,UAAU,CAAC,yBAAyB,CAAC,mBAAmB,CAAC;aAChF,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,GAAG,uCAAuC,CAAC;IAC5D,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,UAAU,EAAE,CAAC;QAC3E,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,qCAAqC,CACxC,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,GAAG,2CAA2C,CAAC;IAChE,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport { EntityStorageAuthenticationRestClient } from \"@3sixty/api-auth-entity-storage-rest-client\";\nimport {\n\tEntityStorageAuthenticationService,\n\tinitSchema as initSchemaAuthEntityStorage,\n\ttype AuthenticationPasswordReset,\n\ttype AuthenticationUser\n} from \"@3sixty/api-auth-entity-storage-service\";\nimport { ContextIdHelper, ContextIdKeys } from \"@3sixty/context\";\nimport { ComponentFactory, type IComponent } from \"@3sixty/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@3sixty/engine-models\";\nimport { EngineTypeHelper, initialiseEntityStorageConnector } from \"@3sixty/engine-types\";\n\nimport type { AuthenticationComponentConfig } from \"../models/config/authenticationComponentConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { AuthenticationComponentType } from \"../models/types/authenticationComponentType.js\";\n\n/**\n * Initialise the entity storage of the authentication users, shared by every component that uses\n * it so the schema and partitions match.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param storageType The configured storage type.\n */\nexport function initialiseAuthenticationUserEntityStorage(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tstorageType: string | undefined\n): void {\n\tinitSchemaAuthEntityStorage();\n\tinitialiseEntityStorageConnector(\n\t\tengineCore,\n\t\tcontext,\n\t\tstorageType,\n\t\t\"AuthenticationUser\",\n\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\tContextIdKeys.Node,\n\t\t\tContextIdKeys.Tenant\n\t\t])\n\t);\n}\n\n/**\n * Initialise the entity storage of the password reset and sign up verification tokens, partitioned\n * like the accounts they belong to.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param storageType The configured storage type.\n */\nexport function initialiseAuthenticationPasswordResetEntityStorage(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tstorageType: string | undefined\n): void {\n\tinitSchemaAuthEntityStorage();\n\tinitialiseEntityStorageConnector(\n\t\tengineCore,\n\t\tcontext,\n\t\tstorageType,\n\t\t\"AuthenticationPasswordReset\",\n\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\tContextIdKeys.Node,\n\t\t\tContextIdKeys.Tenant\n\t\t])\n\t);\n}\n\n/**\n * Initialise the authentication component.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseAuthenticationComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: AuthenticationComponentConfig\n): EngineTypeInitialiserReturn<AuthenticationComponentConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === AuthenticationComponentType.EntityStorage) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitialiseAuthenticationUserEntityStorage(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.userEntityStorageType\n\t\t\t);\n\t\t\tinitialiseAuthenticationPasswordResetEntityStorage(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.passwordResetEntityStorageType\n\t\t\t);\n\t\t\treturn new EntityStorageAuthenticationService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\t\t\t\ttenantAdminComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\"),\n\t\t\t\t\t\tauthenticationAuditServiceType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"authenticationAuditComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tauthenticationRateServiceType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"authenticationRateComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tauthenticationAccountAdminComponentType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"authenticationAccountAdminComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tauthenticationAccountComponentType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"authenticationAccountComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tauthorizationComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"authorizationComponent\"),\n\t\t\t\t\t\torganizationRequestAdminComponentType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"organizationRequestAdminComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tmessagingComponentType: engineCore.getRegisteredInstanceType(\"messagingComponent\"),\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredSilencedType(\n\t\t\t\t\t\t\t\"logging\",\n\t\t\t\t\t\t\t\"EntityStorageAuthenticationService\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttaskSchedulerComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"taskSchedulerComponent\"),\n\t\t\t\t\t\tplatformComponentType: engineCore.getRegisteredInstanceType(\"platformComponent\")\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = \"entity-storage-authentication-service\";\n\t} else if (instanceConfig.type === AuthenticationComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew EntityStorageAuthenticationRestClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = \"entity-storage-authentication-rest-client\";\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"authentication.js","sources":["../../../src/components/authentication.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,mCAAmC;AACnC,uCAAuC;AACvC,OAAO,EAAE,qCAAqC,EAAE,MAAM,6CAA6C,CAAC;AACpG,OAAO,EACN,kCAAkC,EAClC,UAAU,IAAI,2BAA2B,EAIzC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,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B,EAAE,UAAU,CAAC,yBAAyB,CAAC,mBAAmB,CAAC;aAChF,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,GAAG,uCAAuC,CAAC;IAC5D,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,UAAU,EAAE,CAAC;QAC3E,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,qCAAqC,CACxC,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,GAAG,2CAA2C,CAAC;IAChE,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport { EntityStorageAuthenticationRestClient } from \"@3sixty/api-auth-entity-storage-rest-client\";\nimport {\n\tEntityStorageAuthenticationService,\n\tinitSchema as initSchemaAuthEntityStorage,\n\ttype AuthenticationAuthorizationCode,\n\ttype AuthenticationPasswordReset,\n\ttype AuthenticationUser\n} from \"@3sixty/api-auth-entity-storage-service\";\nimport { ContextIdHelper, ContextIdKeys } from \"@3sixty/context\";\nimport { ComponentFactory, type IComponent } from \"@3sixty/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@3sixty/engine-models\";\nimport { EngineTypeHelper, initialiseEntityStorageConnector } from \"@3sixty/engine-types\";\n\nimport type { AuthenticationComponentConfig } from \"../models/config/authenticationComponentConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { AuthenticationComponentType } from \"../models/types/authenticationComponentType.js\";\n\n/**\n * Initialise the entity storage of the authentication users, shared by every component that uses\n * it so the schema and partitions match.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param storageType The configured storage type.\n */\nexport function initialiseAuthenticationUserEntityStorage(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tstorageType: string | undefined\n): void {\n\tinitSchemaAuthEntityStorage();\n\tinitialiseEntityStorageConnector(\n\t\tengineCore,\n\t\tcontext,\n\t\tstorageType,\n\t\t\"AuthenticationUser\",\n\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\tContextIdKeys.Node,\n\t\t\tContextIdKeys.Tenant\n\t\t])\n\t);\n}\n\n/**\n * Initialise the entity storage of the password reset and sign up verification tokens, partitioned\n * like the accounts they belong to.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param storageType The configured storage type.\n */\nexport function initialiseAuthenticationPasswordResetEntityStorage(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tstorageType: string | undefined\n): void {\n\tinitSchemaAuthEntityStorage();\n\tinitialiseEntityStorageConnector(\n\t\tengineCore,\n\t\tcontext,\n\t\tstorageType,\n\t\t\"AuthenticationPasswordReset\",\n\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\tContextIdKeys.Node,\n\t\t\tContextIdKeys.Tenant\n\t\t])\n\t);\n}\n\n/**\n * Initialise the entity storage of the OAuth 2.0 authorization codes of password accounts,\n * partitioned like the accounts they belong to.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param storageType The configured storage type.\n */\nexport function initialiseAuthenticationAuthorizationCodeEntityStorage(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tstorageType: string | undefined\n): void {\n\tinitSchemaAuthEntityStorage();\n\tinitialiseEntityStorageConnector(\n\t\tengineCore,\n\t\tcontext,\n\t\tstorageType,\n\t\t\"AuthenticationAuthorizationCode\",\n\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\tContextIdKeys.Node,\n\t\t\tContextIdKeys.Tenant\n\t\t])\n\t);\n}\n\n/**\n * Initialise the authentication component.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseAuthenticationComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: AuthenticationComponentConfig\n): EngineTypeInitialiserReturn<AuthenticationComponentConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === AuthenticationComponentType.EntityStorage) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitialiseAuthenticationUserEntityStorage(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.userEntityStorageType\n\t\t\t);\n\t\t\tinitialiseAuthenticationPasswordResetEntityStorage(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.passwordResetEntityStorageType\n\t\t\t);\n\t\t\tinitialiseAuthenticationAuthorizationCodeEntityStorage(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.authorizationCodeEntityStorageType\n\t\t\t);\n\t\t\treturn new EntityStorageAuthenticationService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\t\t\t\ttenantAdminComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\"),\n\t\t\t\t\t\tauthenticationAuditServiceType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"authenticationAuditComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tauthenticationRateServiceType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"authenticationRateComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tauthenticationAccountAdminComponentType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"authenticationAccountAdminComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tauthenticationAccountComponentType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"authenticationAccountComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tauthorizationComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"authorizationComponent\"),\n\t\t\t\t\t\torganizationRequestAdminComponentType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"organizationRequestAdminComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tmessagingComponentType: engineCore.getRegisteredInstanceType(\"messagingComponent\"),\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredSilencedType(\n\t\t\t\t\t\t\t\"logging\",\n\t\t\t\t\t\t\t\"EntityStorageAuthenticationService\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttaskSchedulerComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"taskSchedulerComponent\"),\n\t\t\t\t\t\tplatformComponentType: engineCore.getRegisteredInstanceType(\"platformComponent\")\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = \"entity-storage-authentication-service\";\n\t} else if (instanceConfig.type === AuthenticationComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew EntityStorageAuthenticationRestClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = \"entity-storage-authentication-rest-client\";\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0.
|
|
3
3
|
import { EntityStorageAuthenticationProviderConnector } from "@3sixty/api-auth-connector-entity-storage";
|
|
4
4
|
import { AuthenticationProviderFactory } from "@3sixty/api-auth-models";
|
|
5
|
+
import { EntityStorageOAuthProviderConnector } from "@3sixty/api-auth-oauth-connector-entity-storage";
|
|
5
6
|
import { GoogleOAuthProviderConnector } from "@3sixty/api-auth-oauth-connector-google";
|
|
6
7
|
import { MicrosoftOAuthProviderConnector } from "@3sixty/api-auth-oauth-connector-microsoft";
|
|
7
8
|
import { EngineTypeHelper } from "@3sixty/engine-types";
|
|
8
|
-
import { initialiseAuthenticationUserEntityStorage } from "./authentication.js";
|
|
9
|
+
import { initialiseAuthenticationAuthorizationCodeEntityStorage, initialiseAuthenticationUserEntityStorage } from "./authentication.js";
|
|
9
10
|
import { AuthenticationProviderType } from "../models/types/authenticationProviderType.js";
|
|
10
11
|
/**
|
|
11
12
|
* Initialise an authentication provider, registered under its authentication provider id.
|
|
@@ -17,13 +18,21 @@ import { AuthenticationProviderType } from "../models/types/authenticationProvid
|
|
|
17
18
|
export function initialiseAuthenticationProvider(engineCore, context, instanceConfig) {
|
|
18
19
|
let createComponent;
|
|
19
20
|
let instanceTypeName;
|
|
20
|
-
if (instanceConfig.type === AuthenticationProviderType.
|
|
21
|
+
if (instanceConfig.type === AuthenticationProviderType.ThreeSixty) {
|
|
21
22
|
createComponent = (createConfig) => {
|
|
22
23
|
initialiseAuthenticationUserEntityStorage(engineCore, context, createConfig.options?.userEntityStorageType);
|
|
23
24
|
return new EntityStorageAuthenticationProviderConnector(EngineTypeHelper.mergeConfig(createConfig.options));
|
|
24
25
|
};
|
|
25
26
|
instanceTypeName = EntityStorageAuthenticationProviderConnector.NAMESPACE;
|
|
26
27
|
}
|
|
28
|
+
else if (instanceConfig.type === AuthenticationProviderType.ThreeSixtyOAuth) {
|
|
29
|
+
createComponent = (createConfig) => {
|
|
30
|
+
initialiseAuthenticationUserEntityStorage(engineCore, context, createConfig.options?.userEntityStorageType);
|
|
31
|
+
initialiseAuthenticationAuthorizationCodeEntityStorage(engineCore, context, createConfig.options?.authorizationCodeEntityStorageType);
|
|
32
|
+
return new EntityStorageOAuthProviderConnector(EngineTypeHelper.mergeConfig(createConfig.options));
|
|
33
|
+
};
|
|
34
|
+
instanceTypeName = EntityStorageOAuthProviderConnector.NAMESPACE;
|
|
35
|
+
}
|
|
27
36
|
else if (instanceConfig.type === AuthenticationProviderType.Google) {
|
|
28
37
|
createComponent = (createConfig) => new GoogleOAuthProviderConnector(EngineTypeHelper.mergeConfig({
|
|
29
38
|
loggingComponentType: engineCore.getRegisteredSilencedType("logging", "GoogleOAuthProviderConnector")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticationProvider.js","sources":["../../../src/components/authenticationProvider.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AACvC,OAAO,EAAE,4CAA4C,EAAE,MAAM,2CAA2C,CAAC;AACzG,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AACvF,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAO7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,
|
|
1
|
+
{"version":3,"file":"authenticationProvider.js","sources":["../../../src/components/authenticationProvider.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AACvC,OAAO,EAAE,4CAA4C,EAAE,MAAM,2CAA2C,CAAC;AACzG,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,mCAAmC,EAAE,MAAM,iDAAiD,CAAC;AACtG,OAAO,EAAE,4BAA4B,EAAE,MAAM,y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AAI,KAAK,0BAA0B,CAAC,MAAM,EAAE,CAAC;QACtE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,4BAA4B,CAC/B,gBAAgB,CAAC,WAAW,CAC3B;YACC,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CACzD,SAAS,EACT,8BAA8B,CAC9B;SACD,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,GAAG,4BAA4B,CAAC,SAAS,CAAC;IAC3D,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,0BAA0B,CAAC,SAAS,EAAE,CAAC;QACzE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,+BAA+B,CAClC,gBAAgB,CAAC,WAAW,CAC3B;YACC,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CACzD,SAAS,EACT,iCAAiC,CACjC;SACD,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,GAAG,+BAA+B,CAAC,SAAS,CAAC;IAC9D,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,6BAA6B;KACtC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport { EntityStorageAuthenticationProviderConnector } from \"@3sixty/api-auth-connector-entity-storage\";\nimport { AuthenticationProviderFactory } from \"@3sixty/api-auth-models\";\nimport { EntityStorageOAuthProviderConnector } from \"@3sixty/api-auth-oauth-connector-entity-storage\";\nimport { GoogleOAuthProviderConnector } from \"@3sixty/api-auth-oauth-connector-google\";\nimport { MicrosoftOAuthProviderConnector } from \"@3sixty/api-auth-oauth-connector-microsoft\";\nimport type { IComponent } from \"@3sixty/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@3sixty/engine-models\";\nimport { EngineTypeHelper } from \"@3sixty/engine-types\";\n\nimport {\n\tinitialiseAuthenticationAuthorizationCodeEntityStorage,\n\tinitialiseAuthenticationUserEntityStorage\n} from \"./authentication.js\";\nimport type { AuthenticationProviderConfig } from \"../models/config/authenticationProviderConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { AuthenticationProviderType } from \"../models/types/authenticationProviderType.js\";\n\n/**\n * Initialise an authentication provider, registered under its authentication provider id.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseAuthenticationProvider(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: AuthenticationProviderConfig\n): EngineTypeInitialiserReturn<AuthenticationProviderConfig, typeof AuthenticationProviderFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === AuthenticationProviderType.ThreeSixty) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitialiseAuthenticationUserEntityStorage(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.userEntityStorageType\n\t\t\t);\n\t\t\treturn new EntityStorageAuthenticationProviderConnector(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = EntityStorageAuthenticationProviderConnector.NAMESPACE;\n\t} else if (instanceConfig.type === AuthenticationProviderType.ThreeSixtyOAuth) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitialiseAuthenticationUserEntityStorage(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.userEntityStorageType\n\t\t\t);\n\t\t\tinitialiseAuthenticationAuthorizationCodeEntityStorage(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.authorizationCodeEntityStorageType\n\t\t\t);\n\t\t\treturn new EntityStorageOAuthProviderConnector(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = EntityStorageOAuthProviderConnector.NAMESPACE;\n\t} else if (instanceConfig.type === AuthenticationProviderType.Google) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew GoogleOAuthProviderConnector(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredSilencedType(\n\t\t\t\t\t\t\t\"logging\",\n\t\t\t\t\t\t\t\"GoogleOAuthProviderConnector\"\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = GoogleOAuthProviderConnector.NAMESPACE;\n\t} else if (instanceConfig.type === AuthenticationProviderType.Microsoft) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew MicrosoftOAuthProviderConnector(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredSilencedType(\n\t\t\t\t\t\t\t\"logging\",\n\t\t\t\t\t\t\t\"MicrosoftOAuthProviderConnector\"\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = MicrosoftOAuthProviderConnector.NAMESPACE;\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: AuthenticationProviderFactory\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticationProviderConfig.js","sources":["../../../../src/models/config/authenticationProviderConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEntityStorageAuthenticationProviderConnectorConstructorOptions } from \"@3sixty/api-auth-connector-entity-storage\";\nimport type { IGoogleOAuthProviderConnectorConstructorOptions } from \"@3sixty/api-auth-oauth-connector-google\";\nimport type { IMicrosoftOAuthProviderConnectorConstructorOptions } from \"@3sixty/api-auth-oauth-connector-microsoft\";\nimport type { AuthenticationProviderType } from \"../types/authenticationProviderType.js\";\n\n/**\n * Authentication provider config types.\n */\nexport type AuthenticationProviderConfig =\n\t| {\n\t\t\ttype: typeof AuthenticationProviderType.
|
|
1
|
+
{"version":3,"file":"authenticationProviderConfig.js","sources":["../../../../src/models/config/authenticationProviderConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEntityStorageAuthenticationProviderConnectorConstructorOptions } from \"@3sixty/api-auth-connector-entity-storage\";\nimport type { IEntityStorageOAuthProviderConnectorConstructorOptions } from \"@3sixty/api-auth-oauth-connector-entity-storage\";\nimport type { IGoogleOAuthProviderConnectorConstructorOptions } from \"@3sixty/api-auth-oauth-connector-google\";\nimport type { IMicrosoftOAuthProviderConnectorConstructorOptions } from \"@3sixty/api-auth-oauth-connector-microsoft\";\nimport type { AuthenticationProviderType } from \"../types/authenticationProviderType.js\";\n\n/**\n * Authentication provider config types.\n */\nexport type AuthenticationProviderConfig =\n\t| {\n\t\t\ttype: typeof AuthenticationProviderType.ThreeSixty;\n\t\t\toptions?: IEntityStorageAuthenticationProviderConnectorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof AuthenticationProviderType.ThreeSixtyOAuth;\n\t\t\toptions: IEntityStorageOAuthProviderConnectorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof AuthenticationProviderType.Google;\n\t\t\toptions: IGoogleOAuthProviderConnectorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof AuthenticationProviderType.Microsoft;\n\t\t\toptions: IMicrosoftOAuthProviderConnectorConstructorOptions;\n\t };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticationAccountAdminComponentType.js","sources":["../../../../src/models/types/authenticationAccountAdminComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"authenticationAccountAdminComponentType.js","sources":["../../../../src/models/types/authenticationAccountAdminComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG;IACtD;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,UAAU,EAAE,aAAa;CAChB,CAAC","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Authentication account admin component types.\n */\nexport const AuthenticationAccountAdminComponentType = {\n\t/**\n\t * Entity storage.\n\t */\n\tEntityStorage: \"entity-storage\",\n\n\t/**\n\t * REST client.\n\t */\n\tRestClient: \"rest-client\"\n} as const;\n\n/**\n * Authentication account admin component types.\n */\nexport type AuthenticationAccountAdminComponentType =\n\t(typeof AuthenticationAccountAdminComponentType)[keyof typeof AuthenticationAccountAdminComponentType];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticationAccountComponentType.js","sources":["../../../../src/models/types/authenticationAccountComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"authenticationAccountComponentType.js","sources":["../../../../src/models/types/authenticationAccountComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG;IACjD;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,UAAU,EAAE,aAAa;CAChB,CAAC","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Authentication account component types.\n */\nexport const AuthenticationAccountComponentType = {\n\t/**\n\t * Entity storage.\n\t */\n\tEntityStorage: \"entity-storage\",\n\n\t/**\n\t * REST client.\n\t */\n\tRestClient: \"rest-client\"\n} as const;\n\n/**\n * Authentication account component types.\n */\nexport type AuthenticationAccountComponentType =\n\t(typeof AuthenticationAccountComponentType)[keyof typeof AuthenticationAccountComponentType];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticationAdminComponentType.js","sources":["../../../../src/models/types/authenticationAdminComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"authenticationAdminComponentType.js","sources":["../../../../src/models/types/authenticationAdminComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC/C;;OAEG;IACH,aAAa,EAAE,gBAAgB;CACtB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Authentication admin component types.\n */\nexport const AuthenticationAdminComponentType = {\n\t/**\n\t * Entity storage.\n\t */\n\tEntityStorage: \"entity-storage\"\n} as const;\n\n/**\n * Authentication admin component types.\n */\nexport type AuthenticationAdminComponentType =\n\t(typeof AuthenticationAdminComponentType)[keyof typeof AuthenticationAdminComponentType];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticationAuditComponentType.js","sources":["../../../../src/models/types/authenticationAuditComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"authenticationAuditComponentType.js","sources":["../../../../src/models/types/authenticationAuditComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC/C;;OAEG;IACH,aAAa,EAAE,gBAAgB;CACtB,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Authentication audit component types.\n */\nexport const AuthenticationAuditComponentType = {\n\t/**\n\t * Entity storage.\n\t */\n\tEntityStorage: \"entity-storage\"\n} as const;\n\n/**\n * Authentication audit component types.\n */\nexport type AuthenticationAuditComponentType =\n\t(typeof AuthenticationAuditComponentType)[keyof typeof AuthenticationAuditComponentType];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticationComponentType.js","sources":["../../../../src/models/types/authenticationComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"authenticationComponentType.js","sources":["../../../../src/models/types/authenticationComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IAC1C;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,UAAU,EAAE,aAAa;CAChB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Authentication component types.\n */\nexport const AuthenticationComponentType = {\n\t/**\n\t * Entity storage.\n\t */\n\tEntityStorage: \"entity-storage\",\n\n\t/**\n\t * REST client.\n\t */\n\tRestClient: \"rest-client\"\n} as const;\n\n/**\n * Authentication component types.\n */\nexport type AuthenticationComponentType =\n\t(typeof AuthenticationComponentType)[keyof typeof AuthenticationComponentType];\n"]}
|
|
@@ -3,12 +3,15 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Authentication provider types.
|
|
5
5
|
*/
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
6
|
export const AuthenticationProviderType = {
|
|
8
7
|
/**
|
|
9
8
|
* Passwords for accounts held in entity storage.
|
|
10
9
|
*/
|
|
11
|
-
|
|
10
|
+
ThreeSixty: "3sixty",
|
|
11
|
+
/**
|
|
12
|
+
* The password accounts held in entity storage, signed in through OAuth 2.0.
|
|
13
|
+
*/
|
|
14
|
+
ThreeSixtyOAuth: "3sixty-oauth",
|
|
12
15
|
/**
|
|
13
16
|
* Google.
|
|
14
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticationProviderType.js","sources":["../../../../src/models/types/authenticationProviderType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"authenticationProviderType.js","sources":["../../../../src/models/types/authenticationProviderType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACzC;;OAEG;IACH,UAAU,EAAE,QAAQ;IAEpB;;OAEG;IACH,eAAe,EAAE,cAAc;IAE/B;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,SAAS,EAAE,WAAW;CACb,CAAC","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Authentication provider types.\n */\nexport const AuthenticationProviderType = {\n\t/**\n\t * Passwords for accounts held in entity storage.\n\t */\n\tThreeSixty: \"3sixty\",\n\n\t/**\n\t * The password accounts held in entity storage, signed in through OAuth 2.0.\n\t */\n\tThreeSixtyOAuth: \"3sixty-oauth\",\n\n\t/**\n\t * Google.\n\t */\n\tGoogle: \"google\",\n\n\t/**\n\t * Microsoft.\n\t */\n\tMicrosoft: \"microsoft\"\n} as const;\n\n/**\n * Authentication provider types.\n */\nexport type AuthenticationProviderType =\n\t(typeof AuthenticationProviderType)[keyof typeof AuthenticationProviderType];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticationRateComponentType.js","sources":["../../../../src/models/types/authenticationRateComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"authenticationRateComponentType.js","sources":["../../../../src/models/types/authenticationRateComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC9C;;OAEG;IACH,aAAa,EAAE,gBAAgB;CACtB,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Authentication rate component types.\n */\nexport const AuthenticationRateComponentType = {\n\t/**\n\t * Entity storage.\n\t */\n\tEntityStorage: \"entity-storage\"\n} as const;\n\n/**\n * Authentication rate component types.\n */\nexport type AuthenticationRateComponentType =\n\t(typeof AuthenticationRateComponentType)[keyof typeof AuthenticationRateComponentType];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featureComponentType.js","sources":["../../../../src/models/types/featureComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"featureComponentType.js","sources":["../../../../src/models/types/featureComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,UAAU,EAAE,aAAa;CAChB,CAAC","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Feature component types.\n */\nexport const FeatureComponentType = {\n\t/**\n\t * Service.\n\t */\n\tService: \"service\",\n\n\t/**\n\t * REST client.\n\t */\n\tRestClient: \"rest-client\"\n} as const;\n\n/**\n * Feature component types.\n */\nexport type FeatureComponentType = (typeof FeatureComponentType)[keyof typeof FeatureComponentType];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"informationComponentType.js","sources":["../../../../src/models/types/informationComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"informationComponentType.js","sources":["../../../../src/models/types/informationComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACvC;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,UAAU,EAAE,aAAa;CAChB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Information component types.\n */\nexport const InformationComponentType = {\n\t/**\n\t * Service.\n\t */\n\tService: \"service\",\n\n\t/**\n\t * REST client.\n\t */\n\tRestClient: \"rest-client\"\n} as const;\n\n/**\n * Information component types.\n */\nexport type InformationComponentType =\n\t(typeof InformationComponentType)[keyof typeof InformationComponentType];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mimeTypeProcessorType.js","sources":["../../../../src/models/types/mimeTypeProcessorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"mimeTypeProcessorType.js","sources":["../../../../src/models/types/mimeTypeProcessorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACpC;;OAEG;IACH,GAAG,EAAE,KAAK;CACD,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Mime type route processor types.\n */\nexport const MimeTypeProcessorType = {\n\t/**\n\t * Jwt.\n\t */\n\tJwt: \"jwt\"\n} as const;\n\n/**\n * Mime type processor types.\n */\nexport type MimeTypeProcessorType =\n\t(typeof MimeTypeProcessorType)[keyof typeof MimeTypeProcessorType];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauthComponentType.js","sources":["../../../../src/models/types/oauthComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"oauthComponentType.js","sources":["../../../../src/models/types/oauthComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IACjC;;OAEG;IACH,OAAO,EAAE,SAAS;CACT,CAAC","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * OAuth component types.\n */\nexport const OAuthComponentType = {\n\t/**\n\t * Service.\n\t */\n\tService: \"service\"\n} as const;\n\n/**\n * OAuth component types.\n */\nexport type OAuthComponentType = (typeof OAuthComponentType)[keyof typeof OAuthComponentType];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizationComponentType.js","sources":["../../../../src/models/types/organizationComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"organizationComponentType.js","sources":["../../../../src/models/types/organizationComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,UAAU,EAAE,aAAa;CAChB,CAAC","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Organization component types.\n */\nexport const OrganizationComponentType = {\n\t/**\n\t * Entity storage.\n\t */\n\tEntityStorage: \"entity-storage\",\n\n\t/**\n\t * REST client.\n\t */\n\tRestClient: \"rest-client\"\n} as const;\n\n/**\n * Organization component types.\n */\nexport type OrganizationComponentType =\n\t(typeof OrganizationComponentType)[keyof typeof OrganizationComponentType];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizationRequestAdminComponentType.js","sources":["../../../../src/models/types/organizationRequestAdminComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"organizationRequestAdminComponentType.js","sources":["../../../../src/models/types/organizationRequestAdminComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACpD;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,UAAU,EAAE,aAAa;CAChB,CAAC","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Organization request admin component types.\n */\nexport const OrganizationRequestAdminComponentType = {\n\t/**\n\t * Entity storage.\n\t */\n\tEntityStorage: \"entity-storage\",\n\n\t/**\n\t * REST client.\n\t */\n\tRestClient: \"rest-client\"\n} as const;\n\n/**\n * Organization request admin component types.\n */\nexport type OrganizationRequestAdminComponentType =\n\t(typeof OrganizationRequestAdminComponentType)[keyof typeof OrganizationRequestAdminComponentType];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restRouteProcessorType.js","sources":["../../../../src/models/types/restRouteProcessorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"restRouteProcessorType.js","sources":["../../../../src/models/types/restRouteProcessorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC;;OAEG;IACH,UAAU,EAAE,aAAa;IAEzB;;OAEG;IACH,qBAAqB,EAAE,wBAAwB;IAE/C;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,eAAe,EAAE,mBAAmB;IAEpC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,YAAY,EAAE,eAAe;IAE7B;;OAEG;IACH,cAAc,EAAE,iBAAiB;IAEjC;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,aAAa,EAAE,eAAe;IAE9B;;OAEG;IACH,WAAW,EAAE,cAAc;CAClB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * REST route processor types.\n */\nexport const RestRouteProcessorType = {\n\t/**\n\t * Auth header.\n\t */\n\tAuthHeader: \"auth-header\",\n\n\t/**\n\t * Authentication account, sets the identity and organization of the signed in account.\n\t */\n\tAuthenticationAccount: \"authentication-account\",\n\n\t/**\n\t * Logging.\n\t */\n\tLogging: \"logging\",\n\n\t/**\n\t * Context ID.\n\t */\n\tContextId: \"context-id\",\n\n\t/**\n\t * Static Context ID.\n\t */\n\tStaticContextId: \"static-context-id\",\n\n\t/**\n\t * Tenant.\n\t */\n\tTenant: \"tenant\",\n\n\t/**\n\t * Single Tenant.\n\t */\n\tSingleTenant: \"single-tenant\",\n\n\t/**\n\t * Tenant override.\n\t */\n\tTenantOverride: \"tenant-override\",\n\n\t/**\n\t * REST Route.\n\t */\n\tRestRoute: \"rest-route\",\n\n\t/**\n\t * Metrics.\n\t */\n\tMetrics: \"metrics\",\n\n\t/**\n\t * Tracing.\n\t */\n\tTracing: \"tracing\",\n\n\t/**\n\t * Authorization.\n\t */\n\tAuthorization: \"authorization\",\n\n\t/**\n\t * Origin check, rejects cookie authenticated state changing requests from other origins.\n\t */\n\tOriginCheck: \"origin-check\"\n} as const;\n\n/**\n * REST route processor types.\n */\nexport type RestRouteProcessorType =\n\t(typeof RestRouteProcessorType)[keyof typeof RestRouteProcessorType];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socketRouteProcessorType.js","sources":["../../../../src/models/types/socketRouteProcessorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"socketRouteProcessorType.js","sources":["../../../../src/models/types/socketRouteProcessorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACvC;;OAEG;IACH,UAAU,EAAE,aAAa;IAEzB;;OAEG;IACH,qBAAqB,EAAE,wBAAwB;IAE/C;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,eAAe,EAAE,mBAAmB;IAEpC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,YAAY,EAAE,eAAe;IAE7B;;OAEG;IACH,cAAc,EAAE,iBAAiB;IAEjC;;OAEG;IACH,WAAW,EAAE,cAAc;IAE3B;;OAEG;IACH,aAAa,EAAE,eAAe;IAE9B;;OAEG;IACH,WAAW,EAAE,cAAc;CAClB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Socket route processor types.\n */\nexport const SocketRouteProcessorType = {\n\t/**\n\t * Auth header.\n\t */\n\tAuthHeader: \"auth-header\",\n\n\t/**\n\t * Authentication account, sets the identity and organization of the signed in account.\n\t */\n\tAuthenticationAccount: \"authentication-account\",\n\n\t/**\n\t * Logging.\n\t */\n\tLogging: \"logging\",\n\n\t/**\n\t * Context ID.\n\t */\n\tContextId: \"context-id\",\n\n\t/**\n\t * Static Context ID.\n\t */\n\tStaticContextId: \"static-context-id\",\n\n\t/**\n\t * Tenant.\n\t */\n\tTenant: \"tenant\",\n\n\t/**\n\t * Single Tenant.\n\t */\n\tSingleTenant: \"single-tenant\",\n\n\t/**\n\t * Tenant override.\n\t */\n\tTenantOverride: \"tenant-override\",\n\n\t/**\n\t * Socket Route.\n\t */\n\tSocketRoute: \"socket-route\",\n\n\t/**\n\t * Authorization.\n\t */\n\tAuthorization: \"authorization\",\n\n\t/**\n\t * Origin check, rejects cookie authenticated socket connections from other origins.\n\t */\n\tOriginCheck: \"origin-check\"\n} as const;\n\n/**\n * Socket route processor types.\n */\nexport type SocketRouteProcessorType =\n\t(typeof SocketRouteProcessorType)[keyof typeof SocketRouteProcessorType];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webServerType.js","sources":["../../../../src/models/types/webServerType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"webServerType.js","sources":["../../../../src/models/types/webServerType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,MAAM,EAAE,QAAQ;CACP,CAAC","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Web server types.\n */\nexport const WebServerType = {\n\t/**\n\t * Fastify.\n\t */\n\tFastify: \"fastify\",\n\n\t/**\n\t * Hono.\n\t */\n\tHono: \"hono\",\n\n\t/**\n\t * Native Node.js.\n\t */\n\tNative: \"native\"\n} as const;\n\n/**\n * Web server types.\n */\nexport type WebServerType = (typeof WebServerType)[keyof typeof WebServerType];\n"]}
|
|
@@ -18,6 +18,14 @@ export declare function initialiseAuthenticationUserEntityStorage(engineCore: IE
|
|
|
18
18
|
* @param storageType The configured storage type.
|
|
19
19
|
*/
|
|
20
20
|
export declare function initialiseAuthenticationPasswordResetEntityStorage(engineCore: IEngineCore<IEngineServerConfig>, context: IEngineCoreContext<IEngineServerConfig>, storageType: string | undefined): void;
|
|
21
|
+
/**
|
|
22
|
+
* Initialise the entity storage of the OAuth 2.0 authorization codes of password accounts,
|
|
23
|
+
* partitioned like the accounts they belong to.
|
|
24
|
+
* @param engineCore The engine core.
|
|
25
|
+
* @param context The context for the engine.
|
|
26
|
+
* @param storageType The configured storage type.
|
|
27
|
+
*/
|
|
28
|
+
export declare function initialiseAuthenticationAuthorizationCodeEntityStorage(engineCore: IEngineCore<IEngineServerConfig>, context: IEngineCoreContext<IEngineServerConfig>, storageType: string | undefined): void;
|
|
21
29
|
/**
|
|
22
30
|
* Initialise the authentication component.
|
|
23
31
|
* @param engineCore The engine core.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IEntityStorageAuthenticationProviderConnectorConstructorOptions } from "@3sixty/api-auth-connector-entity-storage";
|
|
2
|
+
import type { IEntityStorageOAuthProviderConnectorConstructorOptions } from "@3sixty/api-auth-oauth-connector-entity-storage";
|
|
2
3
|
import type { IGoogleOAuthProviderConnectorConstructorOptions } from "@3sixty/api-auth-oauth-connector-google";
|
|
3
4
|
import type { IMicrosoftOAuthProviderConnectorConstructorOptions } from "@3sixty/api-auth-oauth-connector-microsoft";
|
|
4
5
|
import type { AuthenticationProviderType } from "../types/authenticationProviderType.js";
|
|
@@ -6,8 +7,11 @@ import type { AuthenticationProviderType } from "../types/authenticationProvider
|
|
|
6
7
|
* Authentication provider config types.
|
|
7
8
|
*/
|
|
8
9
|
export type AuthenticationProviderConfig = {
|
|
9
|
-
type: typeof AuthenticationProviderType.
|
|
10
|
+
type: typeof AuthenticationProviderType.ThreeSixty;
|
|
10
11
|
options?: IEntityStorageAuthenticationProviderConnectorConstructorOptions;
|
|
12
|
+
} | {
|
|
13
|
+
type: typeof AuthenticationProviderType.ThreeSixtyOAuth;
|
|
14
|
+
options: IEntityStorageOAuthProviderConnectorConstructorOptions;
|
|
11
15
|
} | {
|
|
12
16
|
type: typeof AuthenticationProviderType.Google;
|
|
13
17
|
options: IGoogleOAuthProviderConnectorConstructorOptions;
|
|
@@ -5,7 +5,11 @@ export declare const AuthenticationProviderType: {
|
|
|
5
5
|
/**
|
|
6
6
|
* Passwords for accounts held in entity storage.
|
|
7
7
|
*/
|
|
8
|
-
readonly
|
|
8
|
+
readonly ThreeSixty: "3sixty";
|
|
9
|
+
/**
|
|
10
|
+
* The password accounts held in entity storage, signed in through OAuth 2.0.
|
|
11
|
+
*/
|
|
12
|
+
readonly ThreeSixtyOAuth: "3sixty-oauth";
|
|
9
13
|
/**
|
|
10
14
|
* Google.
|
|
11
15
|
*/
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.20.0-next.8](https://github.com/3sixtyglobal/engine/compare/engine-server-types-v0.20.0-next.7...engine-server-types-v0.20.0-next.8) (2026-11-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* name the password authentication providers 3sixty and 3sixty-oauth ([#41](https://github.com/3sixtyglobal/engine/issues/41)) ([9f797f6](https://github.com/3sixtyglobal/engine/commit/9f797f6f69dc756861654411a969a56d5be1d8c1))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @3sixty/engine-models bumped from 0.20.0-next.7 to 0.20.0-next.8
|
|
16
|
+
* @3sixty/engine-types bumped from 0.20.0-next.7 to 0.20.0-next.8
|
|
17
|
+
|
|
3
18
|
## [0.20.0-next.7](https://github.com/3sixtyglobal/engine/compare/engine-server-types-v0.20.0-next.6...engine-server-types-v0.20.0-next.7) (2026-11-04)
|
|
4
19
|
|
|
5
20
|
|
package/docs/examples.md
CHANGED
|
@@ -65,7 +65,7 @@ console.log(serverConfig.types.restRouteProcessor?.length ?? 0); // 2
|
|
|
65
65
|
|
|
66
66
|
## Authentication Providers and OAuth
|
|
67
67
|
|
|
68
|
-
Each provider is registered with the authentication provider factory under its id, so `
|
|
68
|
+
Each provider is registered with the authentication provider factory under its id, so `3sixty` handles password logins and `google` or `microsoft` handle OAuth sign in through the OAuth component. `3sixty-oauth` signs the same password accounts in through OAuth 2.0, with the node as the authorization server, sending the browser to `loginPageUrl` for the e-mail address and password. It creates the `authentication-authorization-code` storage, which the authentication component also creates, so codes issued by the authorize endpoint can be redeemed.
|
|
69
69
|
|
|
70
70
|
```typescript
|
|
71
71
|
import type { IEngineServerConfig } from '@3sixty/engine-server-types';
|
|
@@ -78,7 +78,11 @@ import {
|
|
|
78
78
|
const types: Partial<IEngineServerConfig['types']> = {
|
|
79
79
|
authenticationComponent: [{ type: AuthenticationComponentType.EntityStorage }],
|
|
80
80
|
authenticationProvider: [
|
|
81
|
-
{ type: AuthenticationProviderType.
|
|
81
|
+
{ type: AuthenticationProviderType.ThreeSixty },
|
|
82
|
+
{
|
|
83
|
+
type: AuthenticationProviderType.ThreeSixtyOAuth,
|
|
84
|
+
options: { config: { loginPageUrl: 'https://app.example.org/login' } }
|
|
85
|
+
},
|
|
82
86
|
{
|
|
83
87
|
type: AuthenticationProviderType.Google,
|
|
84
88
|
options: {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Function: initialiseAuthenticationAuthorizationCodeEntityStorage()
|
|
2
|
+
|
|
3
|
+
> **initialiseAuthenticationAuthorizationCodeEntityStorage**(`engineCore`, `context`, `storageType`): `void`
|
|
4
|
+
|
|
5
|
+
Initialise the entity storage of the OAuth 2.0 authorization codes of password accounts,
|
|
6
|
+
partitioned like the accounts they belong to.
|
|
7
|
+
|
|
8
|
+
## Parameters
|
|
9
|
+
|
|
10
|
+
### engineCore
|
|
11
|
+
|
|
12
|
+
`IEngineCore`\<[`IEngineServerConfig`](../interfaces/IEngineServerConfig.md)\>
|
|
13
|
+
|
|
14
|
+
The engine core.
|
|
15
|
+
|
|
16
|
+
### context
|
|
17
|
+
|
|
18
|
+
`IEngineCoreContext`\<[`IEngineServerConfig`](../interfaces/IEngineServerConfig.md)\>
|
|
19
|
+
|
|
20
|
+
The context for the engine.
|
|
21
|
+
|
|
22
|
+
### storageType
|
|
23
|
+
|
|
24
|
+
`string` \| `undefined`
|
|
25
|
+
|
|
26
|
+
The configured storage type.
|
|
27
|
+
|
|
28
|
+
## Returns
|
|
29
|
+
|
|
30
|
+
`void`
|
package/docs/reference/index.md
CHANGED
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
|
|
62
62
|
- [initialiseAuthenticationUserEntityStorage](functions/initialiseAuthenticationUserEntityStorage.md)
|
|
63
63
|
- [initialiseAuthenticationPasswordResetEntityStorage](functions/initialiseAuthenticationPasswordResetEntityStorage.md)
|
|
64
|
+
- [initialiseAuthenticationAuthorizationCodeEntityStorage](functions/initialiseAuthenticationAuthorizationCodeEntityStorage.md)
|
|
64
65
|
- [initialiseAuthenticationComponent](functions/initialiseAuthenticationComponent.md)
|
|
65
66
|
- [initialiseAccountDataEntityStorage](functions/initialiseAccountDataEntityStorage.md)
|
|
66
67
|
- [initialiseOrganizationRequestEntityStorage](functions/initialiseOrganizationRequestEntityStorage.md)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Type Alias: AuthenticationProviderConfig
|
|
2
2
|
|
|
3
|
-
> **AuthenticationProviderConfig** = \{ `type`: *typeof* [`
|
|
3
|
+
> **AuthenticationProviderConfig** = \{ `type`: *typeof* [`ThreeSixty`](../variables/AuthenticationProviderType.md#threesixty); `options?`: `IEntityStorageAuthenticationProviderConnectorConstructorOptions`; \} \| \{ `type`: *typeof* [`ThreeSixtyOAuth`](../variables/AuthenticationProviderType.md#threesixtyoauth); `options`: `IEntityStorageOAuthProviderConnectorConstructorOptions`; \} \| \{ `type`: *typeof* [`Google`](../variables/AuthenticationProviderType.md#google); `options`: `IGoogleOAuthProviderConnectorConstructorOptions`; \} \| \{ `type`: *typeof* [`Microsoft`](../variables/AuthenticationProviderType.md#microsoft); `options`: `IMicrosoftOAuthProviderConnectorConstructorOptions`; \}
|
|
4
4
|
|
|
5
5
|
Authentication provider config types.
|
|
@@ -6,12 +6,18 @@ Authentication provider types.
|
|
|
6
6
|
|
|
7
7
|
## Type Declaration
|
|
8
8
|
|
|
9
|
-
###
|
|
9
|
+
### ThreeSixty {#threesixty}
|
|
10
10
|
|
|
11
|
-
> `readonly` **
|
|
11
|
+
> `readonly` **ThreeSixty**: `"3sixty"` = `"3sixty"`
|
|
12
12
|
|
|
13
13
|
Passwords for accounts held in entity storage.
|
|
14
14
|
|
|
15
|
+
### ThreeSixtyOAuth {#threesixtyoauth}
|
|
16
|
+
|
|
17
|
+
> `readonly` **ThreeSixtyOAuth**: `"3sixty-oauth"` = `"3sixty-oauth"`
|
|
18
|
+
|
|
19
|
+
The password accounts held in entity storage, signed in through OAuth 2.0.
|
|
20
|
+
|
|
15
21
|
### Google {#google}
|
|
16
22
|
|
|
17
23
|
> `readonly` **Google**: `"google"` = `"google"`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@3sixty/engine-server-types",
|
|
3
|
-
"version": "0.20.0-next.
|
|
3
|
+
"version": "0.20.0-next.8",
|
|
4
4
|
"description": "Server-focused component types and configuration models for API routing and hosting.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"author": "martyn.janes@iota.org",
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"type": "module",
|
|
13
|
+
"sideEffects": false,
|
|
13
14
|
"engines": {
|
|
14
15
|
"node": ">=24.0.0",
|
|
15
16
|
"bun": ">=1.4.4"
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
"@3sixty/api-auth-entity-storage-rest-client": "next",
|
|
22
23
|
"@3sixty/api-auth-entity-storage-service": "next",
|
|
23
24
|
"@3sixty/api-auth-models": "next",
|
|
25
|
+
"@3sixty/api-auth-oauth-connector-entity-storage": "next",
|
|
24
26
|
"@3sixty/api-auth-oauth-connector-google": "next",
|
|
25
27
|
"@3sixty/api-auth-oauth-connector-microsoft": "next",
|
|
26
28
|
"@3sixty/api-auth-oauth-service": "next",
|
|
@@ -34,8 +36,8 @@
|
|
|
34
36
|
"@3sixty/authorization-service": "next",
|
|
35
37
|
"@3sixty/context": "next",
|
|
36
38
|
"@3sixty/core": "next",
|
|
37
|
-
"@3sixty/engine-models": "0.20.0-next.
|
|
38
|
-
"@3sixty/engine-types": "0.20.0-next.
|
|
39
|
+
"@3sixty/engine-models": "0.20.0-next.8",
|
|
40
|
+
"@3sixty/engine-types": "0.20.0-next.8",
|
|
39
41
|
"@3sixty/nameof": "next",
|
|
40
42
|
"@3sixty/telemetry-processors": "next",
|
|
41
43
|
"@3sixty/tracing-processors": "next"
|