diff options
| author | Brent Shaffer <bshafs@gmail.com> | 2013-03-03 20:10:00 +0400 |
|---|---|---|
| committer | Brent Shaffer <bshafs@gmail.com> | 2013-03-03 20:10:00 +0400 |
| commit | 7f56fa0f388be3fdcd39495f34ed7357c6853915 (patch) | |
| tree | fd16cdbeb82b9e0ca82584f043846e0fb8c50ed4 /src | |
| parent | c3acf3fc98b1f275700669c56dda239145d9330c (diff) | |
| parent | 61c17440f5039ec4e81231b65458cbd42d574f58 (diff) | |
| download | oauth2-server-php-0.4.tar.xz | |
Merge branch 'develop'v0.4
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; } |
