diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/OAuth2/Controller/AccessControllerInterface.php | 2 | ||||
| -rw-r--r-- | src/OAuth2/Controller/AuthorizeController.php | 2 | ||||
| -rw-r--r-- | src/OAuth2/Response.php | 6 | ||||
| -rw-r--r-- | src/OAuth2/Server.php | 4 |
4 files changed, 10 insertions, 4 deletions
diff --git a/src/OAuth2/Controller/AccessControllerInterface.php b/src/OAuth2/Controller/AccessControllerInterface.php index 9ec7a54..76fce03 100644 --- a/src/OAuth2/Controller/AccessControllerInterface.php +++ b/src/OAuth2/Controller/AccessControllerInterface.php @@ -17,5 +17,5 @@ interface OAuth2_Controller_AccessControllerInterface extends OAuth2_Response_Pr { public function verifyAccessRequest(OAuth2_RequestInterface $request, $scope = null); - public function getAccessTokenData(OAuth2_RequestInterface $request); + public function getAccessTokenData(OAuth2_RequestInterface $request, $scope = null); } diff --git a/src/OAuth2/Controller/AuthorizeController.php b/src/OAuth2/Controller/AuthorizeController.php index 89dcfd3..8312ac0 100644 --- a/src/OAuth2/Controller/AuthorizeController.php +++ b/src/OAuth2/Controller/AuthorizeController.php @@ -122,7 +122,7 @@ class OAuth2_Controller_AuthorizeController implements OAuth2_Controller_Authori } } - if ($response_type == self::RESPONSE_TYPE_ACCESS_TOKEN && $this->config['allow_implicit'] === false) { + if ($response_type == self::RESPONSE_TYPE_ACCESS_TOKEN && !$this->config['allow_implicit']) { $this->response = new OAuth2_Response_Redirect($redirect_uri, 302, 'unsupported_response_type', 'implicit grant type not supported', $state); return false; } diff --git a/src/OAuth2/Response.php b/src/OAuth2/Response.php index 4cc9b2b..bc88f2e 100644 --- a/src/OAuth2/Response.php +++ b/src/OAuth2/Response.php @@ -7,6 +7,7 @@ class OAuth2_Response { public $version; protected $statusCode = 200; + protected $statusText; protected $parameters = array(); protected $httpHeaders = array(); @@ -108,6 +109,11 @@ class OAuth2_Response $this->statusText = false === $text ? '' : (null === $text ? self::$statusTexts[$this->statusCode] : $text); } + public function getStatusText() + { + return $this->statusText; + } + public function getParameters() { return $this->parameters; diff --git a/src/OAuth2/Server.php b/src/OAuth2/Server.php index d95cc55..97ecf03 100644 --- a/src/OAuth2/Server.php +++ b/src/OAuth2/Server.php @@ -320,9 +320,9 @@ class OAuth2_Server implements OAuth2_Controller_AccessControllerInterface, return $value; } - public function getAccessTokenData(OAuth2_RequestInterface $request) + public function getAccessTokenData(OAuth2_RequestInterface $request, $scope = null) { - $value = $this->getAccessController()->getAccessTokenData($request); + $value = $this->getAccessController()->getAccessTokenData($request, $scope); $this->response = $this->accessController->getResponse(); return $value; } |
