digitalbazaar / jsonld-signatures

An implementation of the Linked Data Signatures specification for JSON-LD. Works in the browser and Node.js.
BSD 3-Clause "New" or "Revised" License
138 stars 41 forks source link

Dereferencing a URL bug #123

Closed Vishwas1 closed 1 year ago

Vishwas1 commented 3 years ago

Error:

jsonld.InvalidUrl: Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.

Assumptions:

I am guessing it is happening because of the security context URL jsonSigs.SECURITY_CONTEXT_URL : https://w3id.org/security/v2 has been moved to https://w3c-ccg.github.io/security-vocab/contexts/security-v2.jsonld ?

If that is the case then jsonSigs.SECURITY_CONTEXT_URL need to be change.

Vishwas1 commented 3 years ago

I debugged a bit, the problem seems to be with this URL https://www.w3.org/2018/credentials/v1

Vishwas1 commented 3 years ago

Reopening the issue becuase I thought if I can remove that URL from the context and only provide schema URL, it will work. but looks like I was wrong.

image

dlongley commented 1 year ago

Closing as this appears to be a non-issue. By the way, https://w3id.org/security/v2 uses a URL redirection service (w3id.org) which enables it to be moved behind the scenes as needed without changing the w3id.org URL.