Desidero utilizzare coturn with oAuth. Se ho capito correttamente ho bisogno di fare due cose:Come configurare WebRTC con Coturn e oAuth
- memorizzazione dei token OAuth nel coturn database utilizza
- invio del STUN
ACCESS-TOKEN
eUSERNAME
attributi
primo punto è chiaro, ma come devo cambiare il mio client WebRTC per raggiungere il secondo punto?
Senza oAuth avrei inizializzare il mio RTCPeerConnection
in questo modo:
var configuration = {
'iceServers': [{
'url': 'turn:turn.example.org',
'username': 'user',
'credential': 'password'
}]
};
var pc = new RTCPeerConnection(configuration)
Il WebRTC 1.0 draft definisce un enum RTCIceCredentialType
quindi vorrei che ho bisogno di cambiare la mia configurazione come questa:
var configuration = {
'iceServers': [{
'url': 'turn:turn.example.org',
'username': 'kid',
'credential': 'oAuthToken',
'credentialType': 'token'
}]
};
Utilizzando Wireshark I impossibile vedere l'attributo ACESS-TOKEN
. Qualche idea o qualcuno conosce un esempio funzionante?
Qual è il comando che si sta utilizzando per avviare il server TURN? – mido
'turnserver -n -f -v -l stdout -a --oauth -r" myRealm "-J" myMongoConnection "' – lefloh
Sto indovinando l'errore '401' nei registri del server TURN – mido