I found this code which makes it possible to authenticate using setRequestheader and Ajax.
this.xmlDoc.setRequestHeader('Authorization','Basic ' + Base64.encode("User:Password"));
Unfortunatily I have no knowledge of Ajax and Base64 does not seem to be class or method I can reference. Is there an alternative for this Basic encryption? Or a simular encode function I can call from Javascript?
Thank you !
You need a function to Base64 encode the User:Password string. See this question which gives a couple of good options to do this in javascript.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With