@xemahq/platform-common 0.12.2 → 0.12.3
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.
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import type { IssuerTenantResolver } from '@xemahq/oidc-guard';
|
|
2
|
-
export
|
|
3
|
-
Keycloak = "keycloak",
|
|
4
|
-
Oidc = "oidc",
|
|
5
|
-
Entra = "entra"
|
|
6
|
-
}
|
|
7
|
-
export declare const DEFAULT_IDP_KIND = IdpKind.Keycloak;
|
|
2
|
+
export { IdpKind, DEFAULT_IDP_KIND } from '@xemahq/oidc-guard';
|
|
8
3
|
export declare function selectTenantResolver(rawIdpKind: string | undefined): IssuerTenantResolver;
|
|
9
4
|
//# sourceMappingURL=idp-tenant-resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idp-tenant-resolver.d.ts","sourceRoot":"","sources":["../../../src/nestjs/auth/idp-tenant-resolver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"idp-tenant-resolver.d.ts","sourceRoot":"","sources":["../../../src/nestjs/auth/idp-tenant-resolver.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAyC/D,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,oBAAoB,CAEtB"}
|
|
@@ -3,26 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DEFAULT_IDP_KIND = exports.IdpKind = void 0;
|
|
4
4
|
exports.selectTenantResolver = selectTenantResolver;
|
|
5
5
|
const oidc_guard_1 = require("@xemahq/oidc-guard");
|
|
6
|
-
var
|
|
7
|
-
(function (
|
|
8
|
-
|
|
9
|
-
IdpKind["Oidc"] = "oidc";
|
|
10
|
-
IdpKind["Entra"] = "entra";
|
|
11
|
-
})(IdpKind || (exports.IdpKind = IdpKind = {}));
|
|
12
|
-
exports.DEFAULT_IDP_KIND = IdpKind.Keycloak;
|
|
13
|
-
const IDP_KIND_VALUES = new Set(Object.values(IdpKind));
|
|
6
|
+
var oidc_guard_2 = require("@xemahq/oidc-guard");
|
|
7
|
+
Object.defineProperty(exports, "IdpKind", { enumerable: true, get: function () { return oidc_guard_2.IdpKind; } });
|
|
8
|
+
Object.defineProperty(exports, "DEFAULT_IDP_KIND", { enumerable: true, get: function () { return oidc_guard_2.DEFAULT_IDP_KIND; } });
|
|
14
9
|
function selectTenantResolver(rawIdpKind) {
|
|
15
|
-
|
|
16
|
-
const value = (trimmed && trimmed.length > 0 ? trimmed : exports.DEFAULT_IDP_KIND).toLowerCase();
|
|
17
|
-
if (!IDP_KIND_VALUES.has(value)) {
|
|
18
|
-
throw new Error(`Unknown IDP_KIND '${rawIdpKind}'. Expected one of: ${Object.values(IdpKind).join(', ')}.`);
|
|
19
|
-
}
|
|
20
|
-
switch (value) {
|
|
21
|
-
case IdpKind.Keycloak:
|
|
22
|
-
return new oidc_guard_1.KeycloakIssuerTenantResolver();
|
|
23
|
-
case IdpKind.Oidc:
|
|
24
|
-
case IdpKind.Entra:
|
|
25
|
-
return new oidc_guard_1.OidcDiscoveryIssuerTenantResolver();
|
|
26
|
-
}
|
|
10
|
+
return (0, oidc_guard_1.createIssuerTenantResolver)(rawIdpKind);
|
|
27
11
|
}
|
|
28
12
|
//# sourceMappingURL=idp-tenant-resolver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idp-tenant-resolver.js","sourceRoot":"","sources":["../../../src/nestjs/auth/idp-tenant-resolver.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"idp-tenant-resolver.js","sourceRoot":"","sources":["../../../src/nestjs/auth/idp-tenant-resolver.ts"],"names":[],"mappings":";;;AA4CA,oDAIC;AAhDD,mDAAgE;AAGhE,iDAA+D;AAAtD,qGAAA,OAAO,OAAA;AAAE,8GAAA,gBAAgB,OAAA;AAyClC,SAAgB,oBAAoB,CAClC,UAA8B;IAE9B,OAAO,IAAA,uCAA0B,EAAC,UAAU,CAAC,CAAC;AAChD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xemahq/platform-common",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"description": "Shared NestJS building blocks for Xema services — auth guards, response redaction, CORS configuration, and crypto helpers.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Neuralchowder Inc. <developer@xema.dev> (https://xema.dev)",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@xemahq/oidc-guard": "^0.
|
|
41
|
+
"@xemahq/oidc-guard": "^0.5.0",
|
|
42
42
|
"jwks-rsa": "^3.2.2",
|
|
43
43
|
"undici": "^7.29.0",
|
|
44
44
|
"zod": "^4.3.6"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"rxjs": "7.8.2",
|
|
63
63
|
"ts-jest": "^29.4.9",
|
|
64
64
|
"typescript": "5.9.3",
|
|
65
|
-
"@xemahq/kernel-contracts": "^13.0.
|
|
65
|
+
"@xemahq/kernel-contracts": "^13.0.2"
|
|
66
66
|
},
|
|
67
67
|
"exports": {
|
|
68
68
|
".": {
|