@sphereon/ssi-sdk-ext.identifier-resolution 0.36.1-feature.SSISDK.82.and.SSISDK.70.37 → 0.36.1-feature.integration.fides.68

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.js CHANGED
@@ -5176,7 +5176,13 @@ async function resolveExternalDidIdentifier(opts, context) {
5176
5176
  }).resolve(did);
5177
5177
  const didDocument = didResolutionResult.didDocument ?? void 0;
5178
5178
  const didJwks = didDocument ? didDocumentToJwks(didDocument) : void 0;
5179
- const jwks = didJwks ? Array.from(new Set(Array.from(Object.values(didJwks).filter((jwks2) => isDefined(jwks2) && jwks2.length > 0).flatMap((jwks2) => jwks2)).flatMap((jwk) => {
5179
+ const jwks = didJwks ? Array.from(new Set(Array.from(Object.values(didJwks).filter((jwks2) => isDefined(jwks2) && jwks2.length > 0).flatMap((jwks2) => jwks2)).filter((jwk) => {
5180
+ if (!didParsed.fragment) {
5181
+ return true;
5182
+ }
5183
+ const fullKid = `${didParsed.did}#${didParsed.fragment}`;
5184
+ return jwk.kid === fullKid || jwk.kid === didParsed.fragment;
5185
+ }).flatMap((jwk) => {
5180
5186
  return {
5181
5187
  jwk,
5182
5188
  jwkThumbprint: calculateJwkThumbprint2({