fix(vikon): use form-encoded POST + correct domain for OAuth token exchange

- HttpTask::post() now sends application/x-www-form-urlencoded (not JSON)
- AuthenticateAction sends to db-nica.ru (not auth.db-nica.ru) matching original vikon_core
- Original code: remoteRequest($apiDomen . 'oauth2/authorize/token', ...)
This commit is contained in:
F4ilji
2026-07-04 13:46:49 +05:00
parent 2ccfb24d1d
commit a963647770
2 changed files with 2 additions and 2 deletions
@@ -23,7 +23,7 @@ class AuthenticateAction
'client_secret' => $this->clientSecret,
'redirect_uri' => $redirectUri,
'grant_type' => 'authorization_code',
], 'auth');
]);
$body = $response->json();
@@ -24,7 +24,7 @@ class HttpTask
public function post(string $endpoint, array $data = [], string $service = 'api'): \Illuminate\Http\Client\Response
{
$url = $this->url($endpoint, $service);
return $this->client()->post($url, $data);
return $this->client()->asForm()->post($url, $data);
}
public function getWithToken(string $endpoint, string $token, string $service = 'api'): \Illuminate\Http\Client\Response