mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 10:08:05 +00:00
Fix FLEXIAPI-261 Remove the TURN part in the XML provisioning (and only keep the API endpoint)
This commit is contained in:
parent
f566bc0c7c
commit
09f6e1fa6d
3 changed files with 1 additions and 71 deletions
|
|
@ -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
|
||||
----
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue