Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit b117bce

Browse files
committed
Update deps. Closes #248
1 parent 587dc7d commit b117bce

File tree

10 files changed

+25
-34
lines changed

10 files changed

+25
-34
lines changed

.gitignore

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
1-
.idea
2-
*.iml
3-
npm-debug.log
4-
dump.rdb
5-
node_modules
6-
results.tap
7-
results.xml
8-
config.json
9-
.DS_Store
10-
*/.DS_Store
11-
*/*/.DS_Store
12-
._*
13-
*/._*
14-
*/*/._*
1+
**/node_modules
2+
**/package-lock.json
3+
154
coverage.*
16-
.settings
17-
package-lock.json
185

6+
**/.DS_Store
7+
**/._*
8+
9+
**/*.pem

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ language: node_js
22

33
node_js:
44
- "8"
5-
- "9"
5+
- "10"
6+
- "11"
67
- "node"
78

89
sudo: false
9-

LICENSE

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2012-2017, Eran Hammer and Project contributors
1+
Copyright (c) 2012-2018, Eran Hammer and Project contributors
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without
@@ -22,7 +22,3 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2222
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2323
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2424
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25-
26-
* * *
27-
28-
The complete list of contributors can be found at: https://github.com/hueniverse/hawk/graphs/contributors

dist/browser.js

100644100755
File mode changed.

lib/client.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
const Url = require('url');
66

7+
const B64 = require('b64');
78
const Boom = require('boom');
89
const Hoek = require('hoek');
910

@@ -290,7 +291,7 @@ exports.getBewit = function (uri, options) {
290291
// Construct bewit: id\exp\mac\ext
291292

292293
const bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + ext;
293-
return Hoek.base64urlEncode(bewit);
294+
return B64.base64urlEncode(bewit);
294295
};
295296

296297

lib/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@
55
exports.sntp = require('sntp');
66

77
exports.server = require('./server');
8+
89
exports.client = require('./client');
10+
911
exports.crypto = require('./crypto');
12+
1013
exports.utils = require('./utils');
1114

15+
1216
exports.uri = {
1317
authenticate: exports.server.authenticateBewit,
1418
getBewit: exports.client.getBewit

lib/server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
// Load modules
44

5+
const B64 = require('b64');
56
const Boom = require('boom');
67
const Cryptiles = require('cryptiles');
78
const Hoek = require('hoek');
@@ -365,7 +366,7 @@ exports.authenticateBewit = async function (req, credentialsFunc, options) {
365366
// Parse bewit
366367

367368
try {
368-
var bewitString = Hoek.base64urlDecode(resource[3]);
369+
var bewitString = B64.base64urlDecode(resource[3]);
369370
}
370371
catch (err) {
371372
throw Boom.badRequest('Invalid bewit encoding');

package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"name": "hawk",
33
"description": "HTTP Hawk Authentication Scheme",
4-
"version": "7.0.7",
5-
"author": "Eran Hammer <[email protected]> (http://hueniverse.com)",
4+
"version": "7.0.8",
65
"repository": "git://github.com/hueniverse/hawk",
76
"main": "lib/index.js",
87
"browser": "dist/browser.js",
@@ -12,11 +11,9 @@
1211
"scheme",
1312
"hawk"
1413
],
15-
"engines": {
16-
"node": ">=8.9.0"
17-
},
1814
"dependencies": {
19-
"hoek": "5.x.x",
15+
"hoek": "6.x.x",
16+
"b64": "4.x.x",
2017
"boom": "7.x.x",
2118
"cryptiles": "4.x.x",
2219
"sntp": "3.x.x"
@@ -26,7 +23,7 @@
2623
"babel-preset-env": "^1.6.1",
2724
"babel-preset-minify": "^0.3.0",
2825
"code": "5.x.x",
29-
"lab": "15.x.x"
26+
"lab": "17.x.x"
3027
},
3128
"scripts": {
3229
"build-client": "mkdir -p dist; babel lib/browser.js --out-file dist/browser.js",

test/uri.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
const Url = require('url');
66

7+
const B64 = require('b64');
78
const Boom = require('boom');
89
const Code = require('code');
910
const Hawk = require('../lib');
10-
const Hoek = require('hoek');
1111
const Lab = require('lab');
1212

1313

@@ -149,7 +149,7 @@ describe('Uri', () => {
149149

150150
const bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + ext;
151151

152-
req.url += '&bewit=' + Hoek.base64urlEncode(bewit);
152+
req.url += '&bewit=' + B64.base64urlEncode(bewit);
153153

154154
await expect(Hawk.uri.authenticate(req, credentialsFunc)).to.reject('Invalid method');
155155
});

test/utils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ describe('Utils', () => {
110110
for (let i = 0; i < 5000; ++i) {
111111
long += 'x';
112112
}
113+
113114
long += '"';
114115

115116
expect(() => Hawk.utils.parseAuthorizationHeader(long, ['a'])).to.throw('Header length too long');

0 commit comments

Comments
 (0)