Skip to content

Commit 2aa6c69

Browse files
committed
Update error message to reflect new usage
1 parent 24fdd8a commit 2aa6c69

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/grant.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ function extractCredentials (done) {
7474
// Grant type
7575
this.grantType = this.req.body && this.req.body.grant_type;
7676
if (!this.grantType) {
77-
return done(error('invalid_request',
78-
'Invalid or missing grant_type parameter'));
77+
return done(error('invalid_request', 'Missing grant_type parameter'));
7978
} else if (!this.grantType.match(this.config.regex.grantType)) {
8079
return done(error('unsupported_grant_type', 'Unsupported grant type'));
8180
}

test/grant.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ describe('Grant', function() {
7373
request(app)
7474
.post('/oauth/token')
7575
.set('Content-Type', 'application/x-www-form-urlencoded')
76-
.expect(400, /invalid or missing grant_type parameter/i, done);
76+
.expect(400, /missing grant_type parameter/i, done);
7777
});
7878

7979
it('should ensure grant_type is allowed', function (done) {

0 commit comments

Comments
 (0)