comunica / jQuery-Widget.js

🖼 A jQuery widget to query heterogeneous interfaces using Comunica SPARQL
http://query.linkeddatafragments.org/
MIT License
19 stars 34 forks source link

fix: use relative uris in the client id and refer to the local client id #143

Closed jeswr closed 1 year ago

jeswr commented 1 year ago

In theory this fixes https://github.com/comunica/comunica-feature-link-traversal/issues/100 but I cannot test without deploying to a URL since servers can't read clientIds from localhost.

Do you have an easy way of testing the website at a development url?

rubensworks commented 1 year ago

Do you have an easy way of testing the website at a development url?

You could try setting it up at localhost, and overriding your /etc/hosts file to make a domain refer to localhost. (not 100% sure this will work)

jeswr commented 1 year ago

and overriding your /etc/hosts file to make a domain refer to localhost. (not 100% sure this will work)

This won't work because it the Solid Server that needs to retrieve the client-id from the URL as part of the authentication flow.

EDIT I now realise you're probably suggesting testing against a local server implementation. I'll do that for CSS now, but I won't be able to test against ESS for the reason given above.

jeswr commented 1 year ago

@rubensworks - I've now fixed this and been able to successfully test in the localhost. It turns out the the clientID must use absolute URIs to comply with the OIDC spec so I've now got templating in place to create absolute URLs for the client ID document, and use those same URLs in the JavaScript login call.

The baseURL can now be overridden by the -b parameter so once this is merged all instances of the Comunica Website will need to be updated to provide that parameter (except for the one hosted at query.linkeddatafragments.org which is the default value for that parameter).

rubensworks commented 1 year ago

Released as 1.8.0.