Closed bytespider closed 12 years ago
That's interesting. I think as long as one can go in and pull out the signed headers, that allows the greatest compatibility (which this may do). If helper methods were available for popular frameworks (jQ… and others, I guess) – that made it super easy to integrate, even better.
I'm planning on writing the object with the same API, so would proxy getResponseHeader
on the OAuthRequest to the real XMLHttpRequest.
jsOAuth will retain its familiar API methods, but internally will be signed using the OAuthRequest object instead which can be then pulled out and pushed into jQuery once the main authentication has been completed. Or alternatively be used separately away from the jsOAuth library.
Seems like a reasonable approach. Tally ho!
I may not have answered your question directly, but I plan on OAuthRequest being a direct replacement for XHR so you may not need to pull out the signed headers in practice.
Assuming that transport factories would build the correct XHR to proxy off.
Move all signing code to an XHR compatible API with which jQuery.ajax can use.