diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b4be3d..dea6d03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ v1.7 - Fix FLEXIAPI-270 Call the static $apnsTypes attribute in FlexisipPusherConnector - Fix FLEXIAPI-271 Handle properly reversed attributes in objects - Fix FLEXIAPI-237 Add internationalisation support in the app +- Fix FLEXIAPI-261 Remove the TURN part in the XML provisioning (and only keep the API endpoint) v1.6 ---- diff --git a/flexiapi/app/Http/Controllers/Account/ProvisioningController.php b/flexiapi/app/Http/Controllers/Account/ProvisioningController.php index 5628574..df28c8d 100644 --- a/flexiapi/app/Http/Controllers/Account/ProvisioningController.php +++ b/flexiapi/app/Http/Controllers/Account/ProvisioningController.php @@ -250,65 +250,6 @@ class ProvisioningController extends Controller $passwords = $account->passwords()->get(); $authInfoIndex = 0; - // CoTURN - if (hasCoTURNConfigured()) { - list($username, $password) = array_values(getCoTURNCredentials()); - - // net - $section = $xpath->query("//section[@name='net']")->item(0); - - if ($section == null) { - $section = $dom->createElement('section'); - $section->setAttribute('name', 'net'); - $config->appendChild($section); - } - - $ref = Str::random(8); - - $entry = $dom->createElement('entry', $ref); - $entry->setAttribute('name', 'nat_policy_ref'); - $section->appendChild($entry); - - // nat_policy_0 - $section = $dom->createElement('section'); - $section->setAttribute('name', 'nat_policy_0'); - $config->appendChild($section); - - $entry = $dom->createElement('entry', $ref); - $entry->setAttribute('name', 'ref'); - $section->appendChild($entry); - - $entry = $dom->createElement('entry', config('app.coturn_server_host')); - $entry->setAttribute('name', 'stun_server'); - $section->appendChild($entry); - - $entry = $dom->createElement('entry', $username); - $entry->setAttribute('name', 'stun_server_username'); - $section->appendChild($entry); - - $entry = $dom->createElement('entry', 'turn,ice'); - $entry->setAttribute('name', 'protocols'); - $section->appendChild($entry); - - // auth_info_x - $section = $xpath->query("//section[@name='auth_info_" . $authInfoIndex . "']")->item(0); - - if ($section == null) { - $section = $dom->createElement('section'); - $section->setAttribute('name', 'auth_info_' . $authInfoIndex); - $config->appendChild($section); - $authInfoIndex++; - } - - $entry = $dom->createElement('entry', $username); - $entry->setAttribute('name', 'username'); - $section->appendChild($entry); - - $entry = $dom->createElement('entry', $password); - $entry->setAttribute('name', 'passwd'); - $section->appendChild($entry); - } - foreach ($passwords as $password) { $section = $xpath->query("//section[@name='auth_info_" . $authInfoIndex . "']")->item(0); diff --git a/flexiapi/tests/Feature/AccountProvisioningTest.php b/flexiapi/tests/Feature/AccountProvisioningTest.php index d3d0d04..c35a464 100644 --- a/flexiapi/tests/Feature/AccountProvisioningTest.php +++ b/flexiapi/tests/Feature/AccountProvisioningTest.php @@ -368,18 +368,6 @@ class AccountProvisioningTest extends TestCase config()->set('app.coturn_server_host', $host); config()->set('app.coturn_static_auth_secret', 'secret'); - $response = $this->withHeaders([ - 'x-linphone-provisioning' => true, - ]) - ->keyAuthenticated($account) - ->get($this->accountRoute) - ->assertStatus(200) - ->assertHeader('Content-Type', 'application/xml') - ->assertSee($host) - ->assertSee('nat_policy_ref') - ->assertSee('stun_server_username') - ->assertSee('nat_policy_0'); - $this->keyAuthenticated($account) ->get('/api/accounts/me/services/turn') ->assertStatus(200)