microsoft / VerifiableCredentials-Verification-SDK-Typescript

An SDK to help Relying Parties manages their Decentralized Identities and Verifiable Credentials.
MIT License
53 stars 14 forks source link

Ambiguity of the format of universalResolverUrl for the ManagedHttpResolver ctor #49

Closed Riff451 closed 3 years ago

Riff451 commented 4 years ago

Hi, I'm following the documentation here. In the sample the current url passed to the ManagedHttpResolver constructor is: "https://beta.discover.did.microsoft.com/1.0/identifiers" However I think this is not working because the ctor appends the "/1.0/identifiers/" segments again resulting in a wrong url.

https://github.com/microsoft/VerifiableCredentials-Verification-SDK-Typescript/blob/9057276c5738a333a340223ae8d2227271d7197f/lib/Resolver/ManagedHttpResolver.ts#L23

I apologies if the issue is only in the sample/documentation side that needs to use a different url, just "https://beta.discover.did.microsoft.com/" Actually there's a bug note in the sample repo but I wasn't sure: https://github.com/Azure-Samples/active-directory-verifiable-credentials/blob/fb093ccabce6f2cdd2228622c66d397c2c5e9a3e/verifier/app.js#L172

Thanks.

beejones commented 4 years ago

You are correct. I will sync with the docs guys.

beejones commented 3 years ago

This is now fixed. The string passed to the ManagedHttpResolver is used as such. Example: const issuers: any = ; let validator = new ValidatorBuilder(crypto) .useResolver(new ManagedHttpResolver('https://resolver.identity.foundation/1.0/identifiers/')) .build();