Skip to content

Commit cd9dd85

Browse files
committed
Update error message to reflect new usage
1 parent 4dd9d75 commit cd9dd85

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
@@ -73,8 +73,7 @@ function extractCredentials (done) {
7373
// Grant type
7474
this.grantType = this.req.body && this.req.body.grant_type;
7575
if (!this.grantType) {
76-
return done(error('invalid_request',
77-
'Invalid or missing grant_type parameter'));
76+
return done(error('invalid_request', 'Missing grant_type parameter'));
7877
} else if (!this.grantType.match(this.config.regex.grantType)) {
7978
return done(error('unsupported_grant_type', 'Unsupported grant type'));
8079
}

test/grant.js

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

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

0 commit comments

Comments
 (0)