@sparkvault/sdk-js 16.3.0 → 16.4.0

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/index.cjs CHANGED
@@ -18055,7 +18055,12 @@ class HelpDeskClient {
18055
18055
  }, undefined, false);
18056
18056
  if (revision !== this.revision)
18057
18057
  throw sessionChanged();
18058
- if (!validToken(result?.token) || result.customer?.assurance !== 'identity' || !/^hdwip_[A-Za-z0-9_-]{43}$/.test(result.identity_grant?.token)) {
18058
+ // A native sign-in opens a session at the desk's issuer: an email sign-in's customer is linked to
18059
+ // its Secure Identity (`identity`); a sign-in by the organization's own identity provider carries
18060
+ // the `federated` mark and the `federated` assurance together, never one without the other.
18061
+ const customer = result?.customer;
18062
+ const nativeIdentity = customer?.federated === true ? customer.assurance === 'federated' : customer?.assurance === 'identity';
18063
+ if (!validToken(result?.token) || !nativeIdentity || !/^hdwip_[A-Za-z0-9_-]{43}$/.test(result.identity_grant?.token)) {
18059
18064
  throw new SparkVaultError('The help desk returned an invalid support identity.', 'HELP_DESK_INVALID_RESPONSE');
18060
18065
  }
18061
18066
  this.issuedSessions.set(result, result.token);
@@ -29552,7 +29557,7 @@ class SparkVault {
29552
29557
  }
29553
29558
  /** Get the SDK version */
29554
29559
  static get version() {
29555
- return '16.3.0';
29560
+ return '16.4.0';
29556
29561
  }
29557
29562
  }
29558
29563
  if (typeof window !== 'undefined') {