apache / cordova-plugin-file-transfer

Apache Cordova File Transfer Plugin
https://cordova.apache.org/
Apache License 2.0
596 stars 888 forks source link

Authentication using cookies #202

Closed jim0020 closed 3 years ago

jim0020 commented 5 years ago

If I'm connecting to my server using AJAX calls with the option

xhrFields: { withCredentials: true },

how can I do this in calls to FileTransfer? It appears that FileTransfer only supports basic authentication.

timbru31 commented 3 years ago

Basically the withCredentials flag sets/sends the corresponding cookie values as an HTTP header. One can mimic this behavior and supply the cookie(s) in the request headers field. More information on the Cookie Header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cookie