Skip to content

Commit

Permalink
fix declaration of requestAccessToken method
Browse files Browse the repository at this point in the history
  • Loading branch information
blat committed Jan 12, 2018
1 parent 09f4af3 commit 5812501
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/OAuth/OAuth2/Service/Buffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion src/OAuth/OAuth2/Service/Pocket.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
3 changes: 2 additions & 1 deletion src/OAuth/OAuth2/Service/ServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 5812501

Please sign in to comment.