Open aeksco opened 7 years ago
This would be awesome functionality to have! I'm not an expert on http requests with authentication, so I could benefit from your help here.
The package I'm using to get the jsonp is this one: https://github.com/larryosborn/JSONP/blob/master/lib/jsonp.js. I also use d3-request (https://github.com/d3/d3-request) in the case of plain json. If you can find a way to make authentication headers work with either one of those in a general sense I can help guide you through how this app works so we can get it plugged in. The app provides the choice of either jsonp or json (jsonp so that people can run apps without a web server), so as long as we can get one working (ideally both), we should be in good shape.
@hafen Thanks for the prompt reply! I'll take a peek at the documentation for those two libraries - hopefully something as simple as adding a header won't be an agonizing endeavor :)
I'll touch base shortly with an update on my findings - chat soon!
Hi!
I'm working with the DJ team at CASE and we're in the process of integrating TrelliscopeJS as one of our visualization options. Our backend is currently configured to serve the requisite static files behind an authentication wall - I wanted to know it there's a way to configure the
getJSON
andgetJSONP
functions located insrc/actions/index.js
to pass an Authorization header along with the request.If this functionality doesn't currently exist I would be more than happy to help implement the feature - an additional Redux action named
GET_REQUEST_HEADERS
with a corresponding callback defined in theoptions
object passed into thetrelliscopeApp
function would probably do the trick, though admittedly my knowledge of the codebase is cursory at best.I was thinking something like the following:
Let me know if I can lend a hand!
-A