New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@shopmacher/digest-auth-request

Package Overview
Dependencies
Maintainers
6
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopmacher/digest-auth-request

Make digest-auth requests with vanilla javascript

  • 0.8.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-83.33%
Maintainers
6
Weekly downloads
 
Created
Source

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';
		
// create digest request object
var getRequest = new digestAuthRequest('GET', url, 'username', 'password');
		
// make the request
getRequest.request(function(data) { 
  // success callback
  // do something with the data
},function(errorCode) { 
  // error callback
  // tell user request failed
});

// make additional GET requests here...

POST request:


var postData = {
   address: '123 main st.',
   city: 'Denver',
   state: 'Colorado'
}

// create new digest request object
// because method (POST vs GET) is different
// otherwise we could re-use the first one
var postReq = new digestAuthRequest('POST', url, 'username', 'password');

postReq.request(function(data) { 
  // success callback
  // data probably a success message
},function(errorCode) { 
  // error callback
  // tell user request failed
}, 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

  1. Make edits to digestAuthRequest.js in the root
  2. In terminal, run yarn build or simply gulp.

Keywords

FAQs

Package last updated on 26 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc