Skip to content

Commit 146f91e

Browse files
author
Michael Salinger
committed
Updated dependencies
Fixes oauthjs#380 Updated dependencies to latest versions. Changed lodash `contains` to `includes` Changed one should comparison
1 parent 6994ad1 commit 146f91e

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

lib/handlers/authorize-handler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,15 @@ AuthorizeHandler.prototype.getClient = function(request) {
178178
throw new InvalidClientError('Invalid client: missing client `grants`');
179179
}
180180

181-
if (!_.contains(client.grants, 'authorization_code')) {
181+
if (!_.includes(client.grants, 'authorization_code')) {
182182
throw new UnauthorizedClientError('Unauthorized client: `grant_type` is invalid');
183183
}
184184

185185
if (!client.redirectUris || 0 === client.redirectUris.length) {
186186
throw new InvalidClientError('Invalid client: missing client `redirectUri`');
187187
}
188188

189-
if (redirectUri && !_.contains(client.redirectUris, redirectUri)) {
189+
if (redirectUri && !_.includes(client.redirectUris, redirectUri)) {
190190
throw new InvalidClientError('Invalid client: `redirect_uri` does not match client value');
191191
}
192192
return client;

lib/handlers/token-handler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ TokenHandler.prototype.handleGrantType = function(request, client) {
212212
throw new UnsupportedGrantTypeError('Unsupported grant type: `grant_type` is invalid');
213213
}
214214

215-
if (!_.contains(client.grants, grantType)) {
215+
if (!_.includes(client.grants, grantType)) {
216216
throw new UnauthorizedClientError('Unauthorized client: `grant_type` is invalid');
217217
}
218218

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@
1717
],
1818
"main": "index.js",
1919
"dependencies": {
20-
"basic-auth": "^1.0.0",
21-
"bluebird": "^2.9.13",
22-
"lodash": "^3.3.1",
20+
"basic-auth": "1.1.0",
21+
"bluebird": "3.5.0",
22+
"lodash": "4.17.4",
2323
"promisify-any": "2.0.1",
24-
"statuses": "^1.3.1",
25-
"type-is": "^1.6.0"
24+
"statuses": "1.3.1",
25+
"type-is": "1.6.15"
2626
},
2727
"devDependencies": {
28-
"jshint": "^2.9.1",
29-
"mocha": "^3.1.2",
30-
"should": "^5.0.1",
31-
"sinon": "^1.13.0"
28+
"jshint": "2.9.4",
29+
"mocha": "3.3.0",
30+
"should": "11.2.1",
31+
"sinon": "2.1.0"
3232
},
3333
"license": "MIT",
3434
"engines": {

test/integration/handlers/token-handler_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ describe('TokenHandler integration', function() {
966966
var handler = new TokenHandler({ accessTokenLifetime: 120, model: model, refreshTokenLifetime: 120 });
967967
var tokenType = handler.getTokenType({ accessToken: 'foo', refreshToken: 'bar', scope: 'foobar' });
968968

969-
tokenType.should.eql({ accessToken: 'foo', accessTokenLifetime: undefined, refreshToken: 'bar', scope: 'foobar' });
969+
tokenType.should.containEql({ accessToken: 'foo', accessTokenLifetime: undefined, refreshToken: 'bar', scope: 'foobar' });
970970
});
971971
});
972972

0 commit comments

Comments
 (0)