rawgraphs / rawgraphs-app

A web interface to create custom vector-based visualizations on top of RAWGraphs core
https://rawgraphs.io
Apache License 2.0
8.63k stars 1.84k forks source link

Send CORS requests to SPARQL endpoint with credentials #348

Open jaw111 opened 2 years ago

jaw111 commented 2 years ago

In which part of the interface would this feature applies?

[x] 1. Load your data [ ] 2. Choose a chart [ ] 3. Mapping [ ] 4. Customize [ ] 5. Export

Is your feature request related to a problem? Please describe.

I'm trying to load data from a private SPARQL endpoint, but the request from RAWGraphs is not correctly authenticated and the endpoint responds with a 401 Authorization Required status. I am already authenticated against the endpoint and have a session token set in my cookies, but those are not sent on cross-origin requests from RAWGraphs.

Describe the solution you'd like

Include send user credentials (cookies, basic http auth, etc..) for cross-origin calls from RAWGraphs.

Describe alternatives you've considered

  1. Add additional options in RAWGraphs UI where user can enter HTTP Basic credentials and use those to authenticate the request
  2. If the SPARQL endpoint gives a 401 response, then prompt user to enter credentials

Additional context

n/a