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

verifyResourceRequest always returns null #125

Open shayanhusaini opened 7 years ago

shayanhusaini commented 7 years ago

Hi, Please update the method in Server.php file with the following:

public function verifyResourceRequest(\OAuth2\RequestInterface $request = null, \OAuth2\ResponseInterface $response = null, $scope = null)
    {
        if($request === null) {
            $request = $this->module->getRequest();
        }
        return parent::verifyResourceRequest($request, $response, $scope);
    }

Currently it is:

public function verifyResourceRequest(\OAuth2\RequestInterface $request = null, \OAuth2\ResponseInterface $response = null, $scope = null)
    {
        if($request === null) {
            $request = $this->module->getRequest();
        }
        parent::verifyResourceRequest($request, $response, $scope);
    }

so irrespective of value it always returns null

froying commented 7 years ago

httpd 2.4.x , .htaccess add CGIPassAuth on。or RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]