application/x-www-form-urlencoded or multipart/form-data?
Currently, oauth2 library supports only application/x-www-form-urlencoded,
Question: To upload a file (image), it requires a POST of multipart/form-data, if I add access_token to the submission, oauth2 won't work since it doesn't support it.
Need advice on the posibble work-around or patch. Offhand, it is easy to write a subroutine which checks against the stored access token, but that breaks the oauth2 flow.
Thanks in advance, Alvin
If you submit the POST request using multipart/form-data, you can include the access token parameter using the AUTHENTICATE header, or the access_token querystring parameter. The multipart/form-data encoding IS supported, but when used the access token is not allowed in the request body. — Brent Shaffer
On Wed, Jul 3, 2013 at 3:18 PM, alkhoo [email protected] wrote:
Currently, oauth2 library supports only
application/x-www-form-urlencoded, Question: To upload a file (image), it requires a POST ofmultipart/form-data, if I add access_token to the submission, oauth2 won't work since it doesn't support it. Need advice on the posibble work-around or patch. Offhand, it is easy to write a subroutine which checks against the stored access token, but that breaks the oauth2 flow. Thanks in advance,Alvin
Reply to this email directly or view it on GitHub: https://github.com/bshaffer/oauth2-server-php/issues/184