Socket
Socket
Sign inDemoInstall

digest-fetch

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

digest-fetch - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

6

digest-fetch-src.js

@@ -42,3 +42,3 @@ /// !-----------------------------------------------------------------------------------------------------------

// https://stackoverflow.com/questions/9859627/how-to-prevent-browser-to-invoke-basic-auth-popup-and-handle-401-error-using-jqu
this.statusCode = options.statusCode || 401
this.statusCode = options.statusCode
this.basic = options.basic || false

@@ -50,3 +50,3 @@ }

const resp = await fetch(url, this.addAuth(url, options))
if (resp.status == this.statusCode) {
if (resp.status == 401 || (resp.status == this.statusCode && this.statusCode)) {
this.hasAuth = false

@@ -56,3 +56,3 @@ await this.parseAuth(resp.headers.get('www-authenticate'))

const respFinal = await fetch(url, this.addAuth(url, options))
if (respFinal.status == this.statusCode) {
if (respFinal.status == 401 || respFinal.status == this.statusCode) {
this.hasAuth = false

@@ -59,0 +59,0 @@ } else {

{
"name": "digest-fetch",
"version": "1.2.0",
"version": "1.2.1",
"description": "digest auth request plugin for fetch/node-fetch also support http basic auth authentication",

@@ -5,0 +5,0 @@ "main": "digest-fetch-src.js",

@@ -60,3 +60,3 @@ # digest-fetch

| algorithm | string | 'MD5' | algorithm to be used: 'MD5' or 'MD5-sess' |
| statusCode | number | 401 | custom authentication failure code for avoiding browser prompt, see details below |
| statusCode | number | 401 | custom alternate authentication failure code for avoiding browser prompt, see details below |
| cnonceSize | number | 32 | length of the cnonce |

@@ -63,0 +63,0 @@ | logger | object | none | logger for debug, can use `console`, default no logging |

Sorry, the diff of this file is too big to display

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