From 2a8688b54e99a3d7b560ec1aed5db559d1d3153b Mon Sep 17 00:00:00 2001 From: Alex Bilbie <hello@alexbilbie.com> Date: Fri, 1 Feb 2013 15:09:15 +0000 Subject: [PATCH] Update getRequest calls to static requests --- src/OAuth2/Grant/AuthCode.php | 10 +++++----- src/OAuth2/Grant/GrantTypeInterface.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/OAuth2/Grant/AuthCode.php b/src/OAuth2/Grant/AuthCode.php index f26e77f7..efd2659a 100644 --- a/src/OAuth2/Grant/AuthCode.php +++ b/src/OAuth2/Grant/AuthCode.php @@ -25,12 +25,12 @@ class AuthCode implements GrantTypeInterface { return $this->responseType; } - public function completeFlow($inputParams = null, $authParams = array(), Request $request) + public function completeFlow($inputParams = null, $authParams = array()) { // Client ID $authParams['client_id'] = (isset($inputParams['client_id'])) ? $inputParams['client_id'] : - $request->post('client_id'); + AuthServer::getRequest()->post('client_id'); if (is_null($authParams['client_id'])) { throw new Exception\ClientException(sprintf(AuthServer::getExceptionMessage('invalid_request'), 'client_id'), 0); @@ -39,7 +39,7 @@ class AuthCode implements GrantTypeInterface { // Client secret $authParams['client_secret'] = (isset($inputParams['client_secret'])) ? $inputParams['client_secret'] : - $request->post('client_secret'); + AuthServer::getRequest()->post('client_secret'); if (is_null($authParams['client_secret'])) { throw new Exception\ClientException(sprintf(AuthServer::getExceptionMessage('invalid_request'), 'client_secret'), 0); @@ -48,7 +48,7 @@ class AuthCode implements GrantTypeInterface { // Redirect URI $authParams['redirect_uri'] = (isset($inputParams['redirect_uri'])) ? $inputParams['redirect_uri'] : - $request->post('redirect_uri'); + AuthServer::getRequest()->post('redirect_uri'); if (is_null($authParams['redirect_uri'])) { throw new Exception\ClientException(sprintf(AuthServer::getExceptionMessage('invalid_request'), 'redirect_uri'), 0); @@ -66,7 +66,7 @@ class AuthCode implements GrantTypeInterface { // The authorization code $authParams['code'] = (isset($inputParams['code'])) ? $inputParams['code'] : - $request->post('code'); + AuthServer::getRequest()->post('code'); if (is_null($authParams['code'])) { throw new Exception\ClientException(sprintf(AuthServer::getExceptionMessage('invalid_request'), 'code'), 0); diff --git a/src/OAuth2/Grant/GrantTypeInterface.php b/src/OAuth2/Grant/GrantTypeInterface.php index 206f00fc..6f00c8b5 100644 --- a/src/OAuth2/Grant/GrantTypeInterface.php +++ b/src/OAuth2/Grant/GrantTypeInterface.php @@ -16,5 +16,5 @@ interface GrantTypeInterface public function getResponseType(); - public function completeFlow($inputParams = null, $authParams = array(), Request $request); + public function completeFlow($inputParams = null, $authParams = array()); }