filsh / yii2-oauth2-server

A wrapper for implementing an OAuth2 Server(https://github.com/bshaffer/oauth2-server-php)
MIT License
332 stars 167 forks source link

Authentication only working with GET #79

Closed AndresCL closed 8 years ago

AndresCL commented 8 years ago

Im trying to make a simple POST to a controller. I already have the token, but it only works via GET, when I switch to POST it throws an "Unauthorized: You are requesting with an invalid credential".

Please refer to stackoverflow full question: http://stackoverflow.com/questions/35853755/yii2-and-oauth2-unauthorized-when-sending-post-data

Thanks in advance.

AndresCL commented 8 years ago

This is related to Missing Authorization Header (https://github.com/yiisoft/yii2/issues/6631) I had to add SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0 to my .htaccess to solve it.