oauth2yii
oauth2yii copied to clipboard
Don't use php://input to read Post Data
Since a stream opened with php://input can only be read once, you shouldn't directly use it. Now you are using it in \OAuth2\Request::getContent(), so, for instance, after the Yii::app()->oauth2->checkAccess(), it's not possible access to the posted data anymore (in some scenarios like content-type=application/json)
You should use the Yii::app()->getRequest()->getRawBody()