@ibgib/web-gib 0.0.56 → 0.0.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/AUTO-GENERATED-version.d.mts +1 -1
  2. package/dist/AUTO-GENERATED-version.mjs +1 -1
  3. package/dist/api/api-index.mjs +1 -1
  4. package/dist/api/api-index.mjs.map +1 -1
  5. package/dist/api/ibgib-api-bridge.d.mts +97 -0
  6. package/dist/api/ibgib-api-bridge.d.mts.map +1 -1
  7. package/dist/api/ibgib-api-bridge.mjs +205 -3
  8. package/dist/api/ibgib-api-bridge.mjs.map +1 -1
  9. package/dist/identity/custodian-delegate-helper.d.mts +22 -0
  10. package/dist/identity/custodian-delegate-helper.d.mts.map +1 -0
  11. package/dist/identity/custodian-delegate-helper.mjs +50 -0
  12. package/dist/identity/custodian-delegate-helper.mjs.map +1 -0
  13. package/dist/identity/sso-popup-helper.d.mts +33 -0
  14. package/dist/identity/sso-popup-helper.d.mts.map +1 -0
  15. package/dist/identity/sso-popup-helper.mjs +124 -0
  16. package/dist/identity/sso-popup-helper.mjs.map +1 -0
  17. package/dist/index.d.mts +2 -0
  18. package/dist/index.d.mts.map +1 -1
  19. package/dist/index.mjs +3 -0
  20. package/dist/index.mjs.map +1 -1
  21. package/dist/ui/component/identity/add-device/add-device.d.mts.map +1 -1
  22. package/dist/ui/component/identity/add-device/add-device.html +6 -7
  23. package/dist/ui/component/identity/add-device/add-device.mjs +13 -10
  24. package/dist/ui/component/identity/add-device/add-device.mjs.map +1 -1
  25. package/dist/ui/component/identity/identity-header/identity-header.d.mts.map +1 -1
  26. package/dist/ui/component/identity/identity-header/identity-header.mjs +2 -1
  27. package/dist/ui/component/identity/identity-header/identity-header.mjs.map +1 -1
  28. package/dist/ui/component/identity/keystone-creator/keystone-creator.css +114 -9
  29. package/dist/ui/component/identity/keystone-creator/keystone-creator.d.mts +23 -0
  30. package/dist/ui/component/identity/keystone-creator/keystone-creator.d.mts.map +1 -1
  31. package/dist/ui/component/identity/keystone-creator/keystone-creator.html +122 -50
  32. package/dist/ui/component/identity/keystone-creator/keystone-creator.mjs +529 -83
  33. package/dist/ui/component/identity/keystone-creator/keystone-creator.mjs.map +1 -1
  34. package/dist/ui/component/identity/keystone-details/keystone-details.d.mts.map +1 -1
  35. package/dist/ui/component/identity/keystone-details/keystone-details.mjs +19 -61
  36. package/dist/ui/component/identity/keystone-details/keystone-details.mjs.map +1 -1
  37. package/package.json +4 -4
  38. package/src/AUTO-GENERATED-version.mts +1 -1
  39. package/src/api/api-index.mts +1 -1
  40. package/src/api/ibgib-api-bridge.mts +288 -4
  41. package/src/identity/custodian-delegate-helper.mts +61 -0
  42. package/src/identity/sso/{sso-custodian-service.mts → sso-custodian-service.mts.bak} +65 -38
  43. package/src/identity/sso/{sso-custodian-service.respec.mts → sso-custodian-service.respec.mts.bak} +15 -14
  44. package/src/identity/sso-popup-helper.mts +155 -0
  45. package/src/index.mts +3 -0
  46. package/src/ui/component/identity/add-device/add-device.html +6 -7
  47. package/src/ui/component/identity/add-device/add-device.mts +17 -16
  48. package/src/ui/component/identity/identity-header/identity-header.mts +2 -1
  49. package/src/ui/component/identity/keystone-creator/keystone-creator.css +114 -9
  50. package/src/ui/component/identity/keystone-creator/keystone-creator.html +122 -50
  51. package/src/ui/component/identity/keystone-creator/keystone-creator.mts +599 -100
  52. package/src/ui/component/identity/keystone-details/keystone-details.mts +26 -77
  53. package/dist/identity/sso/sso-config-helper.d.mts +0 -7
  54. package/dist/identity/sso/sso-config-helper.d.mts.map +0 -1
  55. package/dist/identity/sso/sso-config-helper.mjs +0 -42
  56. package/dist/identity/sso/sso-config-helper.mjs.map +0 -1
  57. package/dist/identity/sso/sso-custodian-service.d.mts +0 -139
  58. package/dist/identity/sso/sso-custodian-service.d.mts.map +0 -1
  59. package/dist/identity/sso/sso-custodian-service.mjs +0 -443
  60. package/dist/identity/sso/sso-custodian-service.mjs.map +0 -1
  61. package/dist/identity/sso/sso-custodian-service.respec.d.mts +0 -2
  62. package/dist/identity/sso/sso-custodian-service.respec.d.mts.map +0 -1
  63. package/dist/identity/sso/sso-custodian-service.respec.mjs +0 -254
  64. package/dist/identity/sso/sso-custodian-service.respec.mjs.map +0 -1
  65. /package/src/identity/sso/{sso-config-helper.mts → sso-config-helper.mts.bak} +0 -0
@@ -22,6 +22,7 @@ import { getKeystoneSyncService } from "../../../../identity/keystone-sync-servi
22
22
  import { updateSpecialIndex } from "@ibgib/core-gib/dist/timeline/timeline-api.mjs";
23
23
  import { getTjpAddr, toDto } from "@ibgib/core-gib/dist/common/other/ibgib-helper.mjs";
24
24
  import { parseSpaceIb } from "@ibgib/core-gib/dist/witness/space/space-helper.mjs";
25
+ import { executeSsoOAuthPopup } from "../../../../identity/sso-popup-helper.mjs";
25
26
 
26
27
  import { getComponentCtorArg } from "../../../../app-bootstrap/init-orchestration.mjs";
27
28
  import { promptForSecret } from "../../../../helpers.web.mjs";
@@ -403,7 +404,7 @@ export class KeystoneDetailsComponentInstance
403
404
 
404
405
  await this.updateFrameDetailsView();
405
406
  } catch (error) {
406
- console.error(`${lc} ${extractErrorMsg(error)}`);
407
+ console.error(`${lc} Registered identity keystone address ${this.ibGibAddr} not found in local browser space: ${extractErrorMsg(error)} (E: a123456789abcdef0123456789c0003)`);
407
408
  throw error;
408
409
  } finally {
409
410
  if (logalot) { console.log(`${lc} complete.`); }
@@ -951,9 +952,9 @@ export class KeystoneDetailsComponentInstance
951
952
  });
952
953
 
953
954
  // Put evolved parent keystone to server via putEvolveKeystone
954
- const parentTjp = getTjpAddr({ ibGib: this.ibGib! }) || getIbGibAddr({ ibGib: this.ibGib! });
955
+ const parentTjpAddr = getTjpAddr({ ibGib: this.ibGib! }) || getIbGibAddr({ ibGib: this.ibGib! });
955
956
  const syncRes = await getApiBridge().putEvolveKeystone({
956
- domainAddr: parentTjp,
957
+ domainAddr: parentTjpAddr,
957
958
  keystoneIbGib: evolvedParent,
958
959
  relatedKeystoneIbGibs: []
959
960
  });
@@ -1039,70 +1040,17 @@ export class KeystoneDetailsComponentInstance
1039
1040
  this.setSSOStatus(`Linking ${providerId}...`, "info");
1040
1041
 
1041
1042
  try {
1042
- // 1. Fetch public SSO configs from server
1043
- const res = await fetch('/api/identity/sso/config');
1044
- if (!res.ok) {
1045
- throw new Error(`Failed to fetch SSO config from server: ${res.statusText}`);
1046
- }
1047
- const data = await res.json();
1048
- if (!data.success || !data.providers) {
1049
- throw new Error(`SSO configuration fetch failed: ${data.message || 'unknown error'}`);
1050
- }
1051
-
1052
- const providerConfig = data.providers.find((p: any) => p.providerId === providerId);
1053
- if (!providerConfig) {
1054
- throw new Error(`SSO provider '${providerId}' is not configured on the server.`);
1055
- }
1056
-
1057
- // 2. Generate a secure, high-entropy user nonce
1058
- const userNonce = (Math.random().toString(36).substring(2) + Math.random().toString(36).substring(2)).substring(0, 32);
1059
-
1060
- // 3. Construct state payload
1061
- const stateObj = {
1043
+ const resPopup = await executeSsoOAuthPopup({
1062
1044
  providerId,
1063
- parentTjpAddr: this.ibGibAddr,
1064
- userNonce
1065
- };
1066
- const state = btoa(JSON.stringify(stateObj));
1067
-
1068
- // 4. Construct Auth URL
1069
- const authUrl = `${providerConfig.authUrl}?client_id=${providerConfig.clientId}&redirect_uri=${encodeURIComponent(providerConfig.redirectUri)}&response_type=code&scope=${encodeURIComponent(providerConfig.scope)}&state=${encodeURIComponent(state)}`;
1070
-
1071
- // 5. Open popup window
1072
- const popup = window.open(
1073
- authUrl,
1074
- 'sso-oauth-popup',
1075
- 'width=600,height=700,status=yes,toolbar=no,menubar=no,location=yes'
1076
- );
1077
- if (!popup) {
1078
- throw new Error("Popup blocked by browser. Please enable popups for this site.");
1079
- }
1045
+ parentTjpAddr: this.ibGibAddr
1046
+ });
1080
1047
 
1081
- // 6. Listen for callback from pop-up
1082
- let checkClosedInterval: any;
1083
- const messageListener = async (event: MessageEvent) => {
1084
- if (event.origin !== window.location.origin) return;
1085
- const callbackData = event.data;
1086
- if (callbackData && callbackData.type === 'sso-oauth-callback') {
1087
- window.removeEventListener('message', messageListener);
1088
- clearInterval(checkClosedInterval);
1089
- await this.handleSSOLinkCallback(callbackData.code, stateObj, providerConfig.redirectUri);
1090
- }
1091
- };
1092
- window.addEventListener('message', messageListener);
1093
-
1094
- // 7. Poll for manual closure of the popup window
1095
- checkClosedInterval = setInterval(() => {
1096
- if (popup.closed) {
1097
- clearInterval(checkClosedInterval);
1098
- window.removeEventListener('message', messageListener);
1099
- const statusEl = this.elements!.ssoStatusMsgEl;
1100
- if (statusEl.textContent && statusEl.textContent.startsWith('Linking')) {
1101
- this.setSSOStatus('Linking cancelled (window closed).', 'error');
1102
- }
1103
- }
1104
- }, 500);
1048
+ if (!resPopup.success || !resPopup.code) {
1049
+ this.setSSOStatus(resPopup.message || `Linking cancelled.`, "error");
1050
+ return;
1051
+ }
1105
1052
 
1053
+ await this.handleSSOLinkCallback(resPopup.code, resPopup.stateObj, resPopup.redirectUri!);
1106
1054
  } catch (error) {
1107
1055
  console.error(`${lc} SSO link initiation failed: ${extractErrorMsg(error)}`);
1108
1056
  this.setSSOStatus(`Link failed: ${extractErrorMsg(error)}`, "error");
@@ -1389,20 +1337,21 @@ export class KeystoneDetailsComponentInstance
1389
1337
  this.setChangePassphraseStatus("Evolving primary identity keystone...", "info");
1390
1338
 
1391
1339
  const metaspace = await getGlobalMetaspace_waitIfNeeded();
1392
- if (!metaspace) throw new Error("Metaspace not found");
1340
+ if (!metaspace) { throw new Error(`(UNEXPECTED) metaspace falsy? (E: 95e3c8374b0f088f339f5c5a8700f826)`); }
1393
1341
  const space = await metaspace.getLocalUserSpace({ lock: false });
1394
- if (!space) { throw new Error("Local space not found"); }
1342
+ if (!space) { throw new Error(`(UNEXPECTED) couldn't get default local space? (E: 2fc1281c28351fd378a1d7f88eaa0526)`); }
1395
1343
 
1396
1344
  // 2. Rotate parent identity
1397
- debugger; // walk through this...looking for delegate failure
1398
- const { newKeystone: evolvedParent, newDelegates: evolvedDelegates } = await keystoneService.changePassword({
1399
- keystoneIbGib: this.ibGib!,
1400
- newMasterSecret: newPassphrase,
1401
- signingSecret: currentPassphrase,
1402
- signingPoolId: 'manage',
1403
- metaspace,
1404
- space
1405
- });
1345
+ debugger; // walk through this...looking for delegate failure // hmm...I thought we got change password going?
1346
+ const { newKeystone: evolvedParent, newDelegates: evolvedDelegates } =
1347
+ await keystoneService.changePassword({
1348
+ keystoneIbGib: this.ibGib!,
1349
+ newMasterSecret: newPassphrase,
1350
+ signingSecret: currentPassphrase,
1351
+ signingPoolId: 'manage',
1352
+ metaspace,
1353
+ space
1354
+ });
1406
1355
  debugger; // look at evolvedDelegates
1407
1356
 
1408
1357
  this.setChangePassphraseStatus("Resolving and rotating delegate keystones...", "info");
@@ -1458,10 +1407,10 @@ export class KeystoneDetailsComponentInstance
1458
1407
 
1459
1408
  // 4. Sync evolved parent and all evolved delegate keystones atomically
1460
1409
  this.setChangePassphraseStatus("Syncing evolved keystones to server...", "info");
1461
- const parentTjp = getIbGibAddr({ ibGib: this.ibGib! }); // is this.ibGib the tjp always? or is it the latest in the keystone line? Does it matter?
1410
+ const parentTjpAddr = getIbGibAddr({ ibGib: this.ibGib! }); // is this.ibGib the tjp always? or is it the latest in the keystone line? Does it matter?
1462
1411
 
1463
1412
  const syncRes = await getApiBridge().putEvolveKeystone({
1464
- domainAddr: parentTjp,
1413
+ domainAddr: parentTjpAddr,
1465
1414
  keystoneIbGib: evolvedParent,
1466
1415
  relatedKeystoneIbGibs: evolvedDelegates,
1467
1416
  });
@@ -1,7 +0,0 @@
1
- import { SsoServerConfig } from './sso-types.mjs';
2
- /**
3
- * Loads the SSO configuration from environment variables.
4
- * Parses active OAuth2 providers dynamically based on their environment keys.
5
- */
6
- export declare function loadSsoServerConfig(): SsoServerConfig;
7
- //# sourceMappingURL=sso-config-helper.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sso-config-helper.d.mts","sourceRoot":"","sources":["../../../src/identity/sso/sso-config-helper.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAA0C,MAAM,iBAAiB,CAAC;AAE1F;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,eAAe,CA6CrD"}
@@ -1,42 +0,0 @@
1
- /**
2
- * Loads the SSO configuration from environment variables.
3
- * Parses active OAuth2 providers dynamically based on their environment keys.
4
- */
5
- export function loadSsoServerConfig() {
6
- const ssoServerKdfSecret = process.env.SSO_SERVER_KDF_SECRET;
7
- const sessionSecret = process.env.SESSION_SECRET;
8
- if (!ssoServerKdfSecret) {
9
- throw new Error(`SSO_SERVER_KDF_SECRET is missing from environment. (E: 840899ab4fdfd23e89cfae1889cfae12)`);
10
- }
11
- if (!sessionSecret) {
12
- throw new Error(`SESSION_SECRET is missing from environment. (E: bfa899ab4fdfd23e89cfae23)`);
13
- }
14
- const providers = {};
15
- // Load Google Provider if configured
16
- if (process.env.GOOGLE_CLIENT_ID && process.env.GOOGLE_CLIENT_SECRET) {
17
- providers.google = {
18
- providerId: 'google',
19
- clientId: process.env.GOOGLE_CLIENT_ID,
20
- clientSecret: process.env.GOOGLE_CLIENT_SECRET,
21
- tokenUrl: 'https://oauth2.googleapis.com/token',
22
- userInfoUrl: 'https://openidconnect.googleapis.com/v1/userinfo',
23
- jwksUrl: 'https://www.googleapis.com/oauth2/v3/certs'
24
- };
25
- }
26
- // Load GitHub Provider if configured
27
- if (process.env.GITHUB_CLIENT_ID && process.env.GITHUB_CLIENT_SECRET) {
28
- providers.github = {
29
- providerId: 'github',
30
- clientId: process.env.GITHUB_CLIENT_ID,
31
- clientSecret: process.env.GITHUB_CLIENT_SECRET,
32
- tokenUrl: 'https://github.com/login/oauth/access_token',
33
- userInfoUrl: 'https://api.github.com/user'
34
- };
35
- }
36
- return {
37
- ssoServerKdfSecret,
38
- sessionSecret,
39
- providers
40
- };
41
- }
42
- //# sourceMappingURL=sso-config-helper.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sso-config-helper.mjs","sourceRo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,CAAC"}
@@ -1,139 +0,0 @@
1
- import { KeystoneChallengePool } from '@ibgib/core-gib/dist/keystone/keystone-types.mjs';
2
- import { MetaspaceService } from '@ibgib/core-gib/dist/witness/space/metaspace/metaspace-types.mjs';
3
- import { IbGibSpaceAny } from '@ibgib/core-gib/dist/witness/space/space-base-v1.mjs';
4
- import { SsoServerConfig, SsoProviderId, OAuthUserInfo, SsoProviderServerConfig, SsoProviderClientConfig } from './sso-types.mjs';
5
- /**
6
- * Server-side service for token exchange, JWT validation, and user profile normalization.
7
- */
8
- export declare class SsoCustodianService {
9
- private config;
10
- private lc;
11
- private jwksCache;
12
- private jwksTtlMs;
13
- /**
14
- * @param config The server's global SSO configuration.
15
- * - Visibility: Private (Contains high-entropy secrets like `ssoServerKdfSecret` and `sessionSecret`).
16
- * - Generator: Server (Bootstrapped from node environment variables on server initialization).
17
- */
18
- constructor(config: SsoServerConfig);
19
- /**
20
- * Exchanges an authorization code for an OAuth2 token and retrieves normalized user info.
21
- *
22
- * @param providerId The string identifier of the OAuth provider (e.g. 'google' or 'github').
23
- * - Visibility: Public (Non-sensitive metadata string).
24
- * - Generator: Client (Sent from browser UI selection).
25
- *
26
- * @param code The temporary authorization code returned by the OAuth provider.
27
- * - Visibility: Private (Confidential short-lived bearer credential. Must be kept private).
28
- * - Generator: Provider (Created by provider's OAuth page and sent to client redirect URI).
29
- *
30
- * @param redirectUri The redirect URI registered in the provider portal.
31
- * - Visibility: Public (Configuration URL).
32
- * - Generator: Client/Server (Derived from environmental configuration and sent by client).
33
- */
34
- getOAuthUserInfo(providerId: SsoProviderId, code: string, redirectUri: string): Promise<OAuthUserInfo>;
35
- /**
36
- * Directly validates a Google ID Token (JWT) locally and returns normalized user info.
37
- * Useful for client-side authentication handshakes.
38
- *
39
- * @param idToken The raw base64-encoded signed JSON Web Token (JWT) ID token returned by Google.
40
- * - Visibility: Private (Sensitive bearer credential containing signature and claims. Must be kept private).
41
- * - Generator: Provider (Generated and signed cryptographically by Google authentication servers).
42
- */
43
- verifyAndNormalizeGoogleToken(idToken: string): Promise<OAuthUserInfo>;
44
- /**
45
- * Internal: Exchange authorization code for access token / ID token.
46
- *
47
- * @param providerConfig Server configuration settings for the specific provider.
48
- * - Visibility: Private (Contains provider client secrets. Must stay server-side).
49
- * - Generator: Server (Configured from node environment variables).
50
- *
51
- * @param code The temporary authorization code to exchange.
52
- * - Visibility: Private (Short-lived credential. Must be kept private).
53
- * - Generator: Provider (Via OAuth flow).
54
- *
55
- * @param redirectUri The redirect URI registered for the exchange.
56
- * - Visibility: Public (Configuration URL).
57
- * - Generator: Client/Server (From app configuration).
58
- */
59
- private exchangeCodeForTokens;
60
- /**
61
- * Internal: Fetch GitHub user profile and normalize.
62
- *
63
- * @param providerConfig Server configuration settings for GitHub.
64
- * - Visibility: Private (Contains GitHub client secret).
65
- * - Generator: Server (From environment config).
66
- *
67
- * @param accessToken The active OAuth2 access token to authorize the API call.
68
- * - Visibility: Private (Bearer token. Must be kept private).
69
- * - Generator: Provider (GitHub token endpoint).
70
- */
71
- private fetchAndNormalizeGithubUser;
72
- /**
73
- * Internal: Decodes and cryptographically verifies a JWT signature using JWKS public keys.
74
- *
75
- * @param token The raw base64-encoded JWT token to verify.
76
- * - Visibility: Private (Sensitive token. Must be kept private).
77
- * - Generator: Provider (Google / OIDC server).
78
- *
79
- * @param providerConfig The target provider server settings containing `jwksUrl`.
80
- * - Visibility: Private (Contains secrets).
81
- * - Generator: Server (From environment config).
82
- */
83
- verifyJwt(token: string, providerConfig: SsoProviderServerConfig): Promise<any>;
84
- /**
85
- * Internal: Retrieves JWKS keys from cache or fetches them from the provider's jwksUrl.
86
- *
87
- * @param providerConfig The provider config containing the target `jwksUrl`.
88
- * - Visibility: Private (Contains client secrets).
89
- * - Generator: Server (From environment config).
90
- */
91
- private getJwksKeys;
92
- /**
93
- * Derives a server-delegate master secret deterministically using the server's private KDF secret,
94
- * the providerKey, and the user's public nonce.
95
- *
96
- * @param providerKey The unique key identifying the provider and user sub ID (e.g. `google:123...`).
97
- * - Visibility: Public (Identifier saved on parent's delegate claim, safe for log/ledger storage).
98
- * - Generator: Provider/Server (Derived by mapping provider user sub ID after authentication).
99
- *
100
- * @param userNonce The public, high-entropy nonce generated by the client to salt the KDF derivation.
101
- * - Visibility: Public (Salt value stored on parent's delegate claim, safe for ledger storage).
102
- * - Generator: Client (Generated offline on user's device).
103
- */
104
- deriveServerDelegateSecret(providerKey: string, userNonce: string): Promise<string>;
105
- /**
106
- * Creates a public custodian challenge pool (custodian-manage) derived deterministically
107
- * from the server's private KDF secret, providerKey, and userNonce.
108
- *
109
- * @param providerKey The unique key identifying the provider and user sub ID (e.g. `google:123...`).
110
- * - Visibility: Public (Mapped identifier, safe for ledger).
111
- * - Generator: Provider/Server (Derived after successful token exchange).
112
- *
113
- * @param userNonce The public, high-entropy nonce.
114
- * - Visibility: Public (Derivation salt, safe for ledger).
115
- * - Generator: Client (Generated on user's device).
116
- */
117
- createCustodianChallengePool({ providerId, providerKey, userNonce, keystoneAddr, metaspace, space, }: {
118
- providerId: string;
119
- providerKey: string;
120
- userNonce: string;
121
- keystoneAddr: string;
122
- metaspace: MetaspaceService;
123
- space: IbGibSpaceAny;
124
- }): Promise<KeystoneChallengePool>;
125
- /**
126
- * Maps private server configuration to safe public client configurations.
127
- *
128
- * @param hostUrl The root URL host address of the server (e.g. `https://space-gib.localhost` or `https://ibgib.space`).
129
- * - Visibility: Public (Non-sensitive hostname configuration).
130
- * - Generator: Server (Extracted from the HTTP request context headers/protocol).
131
- */
132
- getSsoClientConfigs(hostUrl: string): SsoProviderClientConfig[];
133
- /**
134
- * Revokes an active OAuth access or refresh token with the provider.
135
- * Keeps token revocation logic DRY and centralized.
136
- */
137
- revokeToken(providerId: SsoProviderId, token: string): Promise<void>;
138
- }
139
- //# sourceMappingURL=sso-custodian-service.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sso-custodian-service.d.mts","sourceRoot":"","sources":["../../../src/identity/sso/sso-custodian-service.m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