{"action":"closed","issue":{"url":"https://api.github.com/repos/lepture/flask-oauthlib/issues/171","labels_url":"https://api.github.com/repos/lepture/flask-oauthlib/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/lepture/flask-oauthlib/issues/171/comments","events_url":"https://api.github.com/repos/lepture/flask-oauthlib/issues/171/events","html_url":"https://github.com/lepture/flask-oauthlib/issues/171","id":53912581,"number":171,"title":"Should extract_params capture `request.json` if applicable?","user":{"login":"bartek","id":5839,"avatar_url":"https://avatars.githubusercontent.com/u/5839?v=3","gravatar_id":"","url":"https://api.github.com/users/bartek","html_url":"https://github.com/bartek","followers_url":"https://api.github.com/users/bartek/followers","following_url":"https://api.github.com/users/bartek/following{/other_user}","gists_url":"https://api.github.com/users/bartek/gists{/gist_id}","starred_url":"https://api.github.com/users/bartek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartek/subscriptions","organizations_url":"https://api.github.com/users/bartek/orgs","repos_url":"https://api.github.com/users/bartek/repos","events_url":"https://api.github.com/users/bartek/events{/privacy}","received_events_url":"https://api.github.com/users/bartek/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-09T20:42:32Z","updated_at":"2015-01-12T16:59:11Z","closed_at":"2015-01-12T16:59:11Z","body":"Hi there,\r\n\r\nI've currently implemented OAuth using a GET method, with query string parameters containing the various parameters needed to obtain a token. This works great, so thank you for that!\r\n\r\nHowever, I've been trying to get the same result using a POST method, which I feel should be possible when requesting an OAuth Token (This is using `ResourceOwnerPasswordCredentialsGrant`)\r\n\r\nWhen I try to send my OAuth request as a POST, with the parameters in the JSON body, it doesn't quite work. This is because `extract_params` only looks at `request.form`, where-as the JSON body is in `request.json`\r\n\r\nI'm not familiar enough with OAuth to comment on if this is a good idea or not (I figure you guys can!), so I'd be curious to understand why this is not the case today.\r\n\r\nAt the moment, I can fix this on my own end by adjusting my providers `token_handler` to extract from the JSON body if it feels necessary, but if this is something that makes sense to go into this library .. all the better!\r\n\r\nCheers and thanks :-)"}}