-
22 Dec 2012 4:18 PM #1
Basic Authentication
Basic Authentication
I would like to send basic authorization headers when using the save method on a model. Does anyone know what the correct approach is?
My initial attempt...
model.save({
headers: {
'Authorization': 'Basic ' + Base64.encode('username:password')
},
username: 'username',
password: 'password',
withCredentials: true
});
-
24 Dec 2012 2:19 AM #2
The way I use it is by just setting the headers (as you do) and making sure that it's a POST. Setting username and password again is not necessary in my case.
-
5 Mar 2013 4:39 PM #3
where can we find Base64?
where can we find Base64?
I run Base64.encode('user:password'), but throws :
Uncaught ReferenceError: Base64 is not defined
Where can we find Base64?
thanks,
vng
-
5 Mar 2013 11:05 PM #4


Reply With Quote