From 5812501c254f559494c72c5982d4e7dda84f6695 Mon Sep 17 00:00:00 2001 From: blat Date: Fri, 12 Jan 2018 16:39:21 +0100 Subject: [PATCH] fix declaration of requestAccessToken method --- src/OAuth/OAuth2/Service/Buffer.php | 2 +- src/OAuth/OAuth2/Service/Pocket.php | 2 +- src/OAuth/OAuth2/Service/ServiceInterface.php | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/OAuth/OAuth2/Service/Buffer.php b/src/OAuth/OAuth2/Service/Buffer.php index 5905678e..3f3ca61d 100644 --- a/src/OAuth/OAuth2/Service/Buffer.php +++ b/src/OAuth/OAuth2/Service/Buffer.php @@ -108,7 +108,7 @@ protected function parseRequestTokenResponse($responseBody) return $data['code']; } - public function requestAccessToken($code) + public function requestAccessToken($code, $state = null) { $bodyParams = array( 'client_id' => $this->credentials->getConsumerId(), diff --git a/src/OAuth/OAuth2/Service/Pocket.php b/src/OAuth/OAuth2/Service/Pocket.php index 8c955440..6c5cb7e8 100644 --- a/src/OAuth/OAuth2/Service/Pocket.php +++ b/src/OAuth/OAuth2/Service/Pocket.php @@ -85,7 +85,7 @@ protected function parseRequestTokenResponse($responseBody) return $data['code']; } - public function requestAccessToken($code) + public function requestAccessToken($code, $state = null) { $bodyParams = array( 'consumer_key' => $this->credentials->getConsumerId(), diff --git a/src/OAuth/OAuth2/Service/ServiceInterface.php b/src/OAuth/OAuth2/Service/ServiceInterface.php index e689a4c0..e7c2e76a 100644 --- a/src/OAuth/OAuth2/Service/ServiceInterface.php +++ b/src/OAuth/OAuth2/Service/ServiceInterface.php @@ -29,10 +29,11 @@ interface ServiceInterface extends BaseServiceInterface * Retrieves and stores/returns the OAuth2 access token after a successful authorization. * * @param string $code The access code from the callback. + * @param string $state * * @return TokenInterface $token * * @throws TokenResponseException */ - public function requestAccessToken($code); + public function requestAccessToken($code, $state = null); }