Permalink
Browse files

Support POST params in authorize requests. Closes #27.

  • Loading branch information...
1 parent 074f9a8 commit 34c92ad3f66b5b2c789b9a3d7e06d9fc4446bedc @ammmir committed Jan 22, 2013
Showing with 5 additions and 5 deletions.
  1. +5 −5 index.js
View
@@ -119,11 +119,11 @@ OAuth2Provider.prototype.oauth = function() {
});
} else if(req.method == 'POST' && self.options.authorize_uri == uri) {
- var client_id = req.query.client_id,
- redirect_uri = req.query.redirect_uri,
- response_type = req.query.response_type || 'code',
- state = req.query.state,
- x_user_id = req.query.x_user_id;
+ var client_id = (req.query.client_id || req.body.client_id),
+ redirect_uri = (req.query.redirect_uri || req.body.redirect_uri),
+ response_type = (req.query.response_type || req.body.response_type) || 'code',
+ state = (req.query.state || req.body.state),
+ x_user_id = (req.query.x_user_id || req.body.x_user_id);
var url = redirect_uri;

0 comments on commit 34c92ad

Please sign in to comment.