Digest Auth Request
Make digest-auth ajax requests with javascript. Only depency is CryptoJS MD5.
More info on Digest Auth: http://en.wikipedia.org/wiki/Digest_access_authentication
Currently only supports "auth" quality-of-protection type.
Usage:
GET request:
var url = 'http://example.com/protected-resource';
var getRequest = new digestAuthRequest('GET', url, 'username', 'password');
getRequest.request(function(data) {
},function(errorCode) {
});
POST request:
var postData = {
address: '123 main st.',
city: 'Denver',
state: 'Colorado'
}
var postReq = new digestAuthRequest('POST', url, 'username', 'password');
postReq.request(function(data) {
},function(errorCode) {
}, postData);
Toggle console logging
Out of the box digestAuthRequest.js has logging turned on so you can debug. Set loggingOn
to false to disable it.
Contributing
- Make edits to
digestAuthRequest.js
in the root - In terminal, run
yarn build
or simply gulp
.