Parse a WWW-Authenticate: Digest response header into a structured DigestChallenge.
WWW-Authenticate: Digest
Raw WWW-Authenticate header value (e.g. from a 401 response).
WWW-Authenticate
Parsed challenge parameters.
If realm or nonce are missing.
realm
nonce
const challenge = parseDigestChallenge( 'Digest realm="testrealm@host.com", nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093"',);console.log(challenge.realm); // "testrealm@host.com" Copy
const challenge = parseDigestChallenge( 'Digest realm="testrealm@host.com", nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093"',);console.log(challenge.realm); // "testrealm@host.com"
Parse a
WWW-Authenticate: Digestresponse header into a structured DigestChallenge.