Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

www-authenticate

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

www-authenticate - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

18

lib/www-authenticate.js

@@ -30,6 +30,6 @@

if (options) {
if (options.cnonce)
if (toString.call(options.cnonce) == '[object String]')
cnonce= options.cnonce;
}
if (!cnonce) cnonce= crypto.pseudoRandomBytes(8);
if (cnonce === void 0) cnonce= crypto.pseudoRandomBytes(8).toString('hex');
return function parse_header(www_authenticate)

@@ -52,3 +52,7 @@ {

case 'Basic':
var auth_string= 'Basic '+new Buffer(username+':'+password || "", "ascii").toString("base64");
var auth_string=
password !== '' && !password && options.password_optional?
'Basic '+new Buffer(username, "ascii").toString("base64")
:
'Basic '+new Buffer(username+':'+password, "ascii").toString("base64")
this.authorize= function() {

@@ -64,3 +68,7 @@ return auth_string;

var ha1= md5(username+':'+realm+':'+password);
var ha1=
password !== '' && !password && options.password_optional?
md5(username+':'+realm)
:
md5(username+':'+realm+':'+password)
var nonce= auth_parms.nonce;

@@ -92,3 +100,3 @@ if (!nonce) {

if (algorithm) {
fixed+= ', algorithm="'+algorithm+'"';
fixed+= ' algorithm="'+algorithm+'",';
}

@@ -95,0 +103,0 @@ else {

{
"name": "www-authenticate",
"description": "Provides the functionality needed for a client to use HTTP Basic or Digest authentication. Also provides primitives for parsing WWW-Authenticate and Authentication_Info headers.",
"version": "0.1.1",
"version": "0.2.0",
"homepage": "https://github.com/randymized/www-authenticate",

@@ -6,0 +6,0 @@ "author": {

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