Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/controller/authorization.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ module.exports = function(req, res, next) {
},
// Parse and check scope against supported and client available scopes
function(cb) {
scope = req.oauth2.model.client.transformScope(req.query.scope);
scope = req.method == 'POST' ? req.body.scope : req.query.scope;
scope = req.oauth2.model.client.transformScope(scope);
scope = req.oauth2.model.client.checkScope(client, scope);
if (!scope)
cb(new error.invalidScope('Invalid scope for the client'));
Expand Down