Socket
Socket
Sign inDemoInstall

hawk

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hawk - npm Package Compare versions

Comparing version 5.1.2 to 6.0.0

10

dist/browser.js

@@ -194,3 +194,3 @@ 'use strict';

/*
request: object created via 'new XMLHttpRequest()' after response received
request: object created via 'new XMLHttpRequest()' after response received or fetch API 'Response'
artifacts: object received from header().artifacts

@@ -209,2 +209,10 @@ options: {

// Fetch API or plain headers
if (request.headers) {
return typeof request.headers.get === 'function' ? request.headers.get(name) : request.headers[name];
}
// XMLHttpRequest
return request.getResponseHeader ? request.getResponseHeader(name) : request.getHeader(name);

@@ -211,0 +219,0 @@ };

18

lib/browser.js

@@ -97,3 +97,3 @@ 'use strict';

nonce: options.nonce || hawk.utils.randomString(6),
method: method,
method,
resource: uri.resource,

@@ -222,3 +222,3 @@ host: uri.host,

/*
request: object created via 'new XMLHttpRequest()' after response received
request: object created via 'new XMLHttpRequest()' after response received or fetch API 'Response'
artifacts: object received from header().artifacts

@@ -237,3 +237,11 @@ options: {

return request.getResponseHeader ? request.getResponseHeader(name) : request.getHeader(name);
// Fetch API or plain headers
if (request.headers) {
return (typeof request.headers.get === 'function' ? request.headers.get(name) : request.headers[name]);
}
// XMLHttpRequest
return (request.getResponseHeader ? request.getResponseHeader(name) : request.getHeader(name));
};

@@ -344,4 +352,4 @@

nonce: options.nonce || hawk.utils.randomString(6),
host: host,
port: port,
host,
port,
hash: hawk.crypto.calculatePayloadHash(message, credentials.algorithm)

@@ -348,0 +356,0 @@ };

@@ -95,3 +95,3 @@ 'use strict';

nonce: options.nonce || Cryptiles.randomString(6),
method: method,
method,
resource: uri.pathname + (uri.search || ''), // Maintain trailing '?'

@@ -376,4 +376,4 @@ host: uri.hostname,

nonce: options.nonce || Cryptiles.randomString(6),
host: host,
port: port,
host,
port,
hash: Crypto.calculatePayloadHash(message, credentials.algorithm)

@@ -380,0 +380,0 @@ };

@@ -127,3 +127,3 @@ 'use strict';

const tsm = exports.calculateTsMac(now, credentials);
return { ts: now, tsm: tsm };
return { ts: now, tsm };
};

@@ -506,4 +506,4 @@ 'use strict';

nonce: authorization.nonce,
host: host,
port: port,
host,
port,
hash: authorization.hash

@@ -510,0 +510,0 @@ };

{
"name": "hawk",
"description": "HTTP Hawk Authentication Scheme",
"version": "5.1.2",
"version": "6.0.0",
"author": "Eran Hammer <eran@hammer.io> (http://hueniverse.com)",

@@ -16,7 +16,7 @@ "repository": "git://github.com/hueniverse/hawk",

"engines": {
"node": ">=4.0.0"
"node": ">=4.5.0"
},
"dependencies": {
"hoek": "4.x.x",
"boom": "3.x.x",
"boom": "4.x.x",
"cryptiles": "3.x.x",

@@ -29,3 +29,3 @@ "sntp": "2.x.x"

"code": "3.x.x",
"lab": "10.x.x"
"lab": "11.x.x"
},

@@ -32,0 +32,0 @@ "babel": {

@@ -6,5 +6,5 @@ ![hawk Logo](https://raw.github.com/hueniverse/hawk/master/images/hawk.png)

Current version: **5.x**
Current version: **6.x**
Note: 5.x, 4.x, 3.x, and 2.x are the same exact protocol as 1.1. The version increments reflect changes in the node API.
Note: 6.x, 5.x, 4.x, 3.x, and 2.x are the same exact protocol as 1.1. The version increments reflect changes in the node API.

@@ -11,0 +11,0 @@ [![Build Status](https://travis-ci.org/hueniverse/hawk.svg?branch=master)](https://travis-ci.org/hueniverse/hawk)

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