I want to use coturn with oAuth . If I understood correctly, I need to do two things:
- Storing oAuth tokens in coturn database uses
- Sending
ACCESS-TOKEN and USERNAME STUN Attributes
The first point is clear, but how do I need to change my WebRTC client to reach the second point?
Without oAuth, I would initialize my RTCPeerConnection as follows:
var configuration = { 'iceServers': [{ 'url': 'turn:turn.example.org', 'username': 'user', 'credential': 'password' }] }; var pc = new RTCPeerConnection(configuration)
The WebRTC 1.0 project defines an RTCIceCredentialType enumeration, so I think I need to change my configuration as follows:
var configuration = { 'iceServers': [{ 'url': 'turn:turn.example.org', 'username': 'kid', 'credential': 'oAuthToken', 'credentialType': 'token' }] };
Using Wireshark I do not see the ACESS-TOKEN . Any ideas or does anyone know a working example?
oauth webrtc stun turn rfc5766turnserver
lefloh
source share