diff --git a/src/OAuth/ResourceOwner/OdnoklassnikiResourceOwner.php b/src/OAuth/ResourceOwner/OdnoklassnikiResourceOwner.php index ad5b89720..f88bee784 100644 --- a/src/OAuth/ResourceOwner/OdnoklassnikiResourceOwner.php +++ b/src/OAuth/ResourceOwner/OdnoklassnikiResourceOwner.php @@ -14,6 +14,7 @@ use HWI\Bundle\OAuthBundle\OAuth\Exception\HttpTransportException; use HWI\Bundle\OAuthBundle\Security\Core\Authentication\Token\OAuthToken; use Symfony\Component\HttpClient\Exception\JsonException; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; @@ -37,6 +38,19 @@ final class OdnoklassnikiResourceOwner extends GenericOAuth2ResourceOwner 'lastname' => 'last_name', ]; + /** + * {@inheritdoc} + */ + public function getAccessToken(Request $request, $redirectUri, array $extraParameters = []) + { + $extraParameters = array_merge([ + 'client_id' => $this->options['client_id'], + 'client_secret' => $this->options['client_secret'], + ], $extraParameters); + + return parent::getAccessToken($request, $redirectUri, $extraParameters); + } + /** * {@inheritdoc} */