Gathering detailed insights and metrics for indigestion
Gathering detailed insights and metrics for indigestion
Gathering detailed insights and metrics for indigestion
Gathering detailed insights and metrics for indigestion
npm install indigestion
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (100%)
Total Downloads
54,946
Last Day
22
Last Week
277
Last Month
986
Last Year
8,671
MIT License
1 Stars
60 Commits
1 Watchers
3 Branches
1 Contributors
Updated on Dec 06, 2022
Minified
Minified + Gzipped
Latest Version
0.3.0
Package Id
indigestion@0.3.0
Unpacked Size
13.95 kB
Size
4.94 kB
File Count
9
NPM Version
8.11.0
Node Version
16.16.0
Cumulative downloads
Total Downloads
Last Day
-21.4%
22
Compared to previous day
Last Week
10.4%
277
Compared to previous week
Last Month
-25.3%
986
Compared to previous month
Last Year
3.7%
8,671
Compared to previous year
2
Digest Authentication header generator. Takes the www-authenticate
header response and returns the Digest...
header as a string.
npm install indigestion
indigestion
import indigestion = require("indigestion");
generateDigestAuth()
functionconst digest = indigestion.generateDigestAuth({
authenticateHeader: `Digest qop="auth-int", realm="realm", nonce="nonce"`,
username: "username",
password: "password",
uri: "uri"
method: "method",
cnonce: "cnonce", //optional
nc: "nc", //optional
entityBody: "entityBody" //optional
})
cnonce
is not provided, it will default to ""
.nc
(nonce count) is not provided, it will default to "00000000"
.
nc
is provided, the returned nc
will be the provided nc
+ 1 (in hexadecimal)qop=auth-int
, entityBody
is not optionalfindNonceCount()
function to easily parse the informationconst nc = indigestion.findNonceCount(`Digest username="username" realm="realm" nonce="ce16c4a1092c8152f673edab4e56cbdc" uri="/uri" algorithm="MD5" qop=auth-int nc=1234ABCD cnonce="" response=04f863229e7ea0b17120ab0ef97e4649`);
The above will return 1234ABCD
.
www-authenticate
response header from the initial 401 response.axios-digest
, digest-fetch
or node-digest-auth-client
, where you want to control the request being sent and just need to be able to pass in the auth header.axios
, something like this...import axios = require("axios");
import indigestion = require("indigestion);
return new Promise((resolve, reject) => {
axios
.get("http://www.test.com/test")
.then(result => {
resolve(result);
})
.catch(error => {
if (error.response.status !== 401) reject(error);
else {
// If we get a 401 response, we know we have to generate a header.
// Pull the `www-authenticate` header from the response headers
const authenticateHeader = error.response.headers["www-authenticate"];
// Pass in required information to indigestion, which returns the auth string
const authorization = indigestion.generateDigestAuth({
authenticateHeader,
username: "username",
password: "password",
uri: "/test"
method: "GET"
})
// Try the GET again, this time with the Authorization header specified.
axios
.get("http://www.test.com/test", { headers: {Authorization: authorization}})
.then(result => {
resolve(result);
})
.catch(error => {
reject(error);
})
}
});
});
String.prototype.matchAll()
functionality used requires node v12.0.0 and above.qop=auth
opaque
is insignificant and NOT provided by the www-authenticate
headercnonce
is insignificant and NOT provided by the www-authenticate
headeralgorithm
is not specified in www-authenticate
header, so md5
is defaultedqop=auth-int
or qop
is not provided by www-authenticate
headeropaque
is significant and provided by www-authenticate
headercnonce
is signficant and provided by www-authenticate
headeralgorithm
is specified as md5
or md5-sess
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
5 existing vulnerabilities detected
Details
Reason
Found 0/6 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More