Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

multiple did methods aren't supported #31

Open
@siacomuzzi

Description

Hi,

I think I found an issue in /functions/DIDResolution.ts:

https://github.com/Sphereon-Opensource/did-auth-siop/blob/cdbbcfe3c9e5d7a7b099abbf8371230485acc7e9/src/main/functions/DIDResolution.ts#L17-L24

Please note that uniResolvers is an array, so ...uniResolvers will send N args to the Resolver constructor (where N is the number of elements of the array). Causing that only the first element of the array is configured as resolver.

Proposed fix, use a json object instead of array:

let uniResolvers = {};
for (const didMethod of opts.didMethods) {
  const uniResolver = getUniResolver(getMethodFromDid(didMethod), { resolveUrl: opts.resolveUrl });
  uniResolvers = { ...uniResolvers, ...uniResolver };
}
return new Resolver(uniResolvers);

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions