digest-auth-utils
v0.1.1
Published
Digest authentication utilities
Downloads
4
Readme
digest-auth-utils
Common digest authentication utilities.
Install
npm install --save digest-auth-utils
Usage
var digestUtils = require('digest-auth-utils');
var serverReply = 'WWW-Authenticate: Digest \
realm="[email protected]",\
qop="auth,auth-int",\
nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093",\
opaque="5ccc069c403ebaf9f0171e9517f40e41"';
console.log("Chalenge: "+serverReply);
var challenge = digestUtils.parseServerChallenge(serverReply);
var authHeader = digestUtils.generateRequestHeader(1, challenge, "Mufasa", "Circle Of Life", "GET", "/dir/index.html");
console.log("Authorization: "+authHeader);
TODO:
- Server support.