From c14c7135b2c4436f93b4eb905f701f21a7168d25 Mon Sep 17 00:00:00 2001 From: DreamD7 <105148933+DreamD7@users.noreply.github.com> Date: Tue, 5 Nov 2024 08:08:59 +0300 Subject: [PATCH] Update OdnoklassnikiResourceOwner.php --- .../ResourceOwner/OdnoklassnikiResourceOwner.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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} */