【问题标题】:How to setup coturn for oauth authentication如何为 oauth 身份验证设置 coturn
【发布时间】:2019-10-04 12:09:53
【问题描述】:

我正在使用以下命令通过 OAuth 身份验证启动 turnserver sudo turnserver -v -a --oauth -f -r localhost -e "postgresql://postgres:postgres@127.0.0.1:5432/rpturn"

我发送了如下 OAuth 凭据以测试身份验证

var configuration = {
    'iceServers': [{
        "urls": "turns:turn.example.net",
        "username": "username",
        "credential": {
            "macKey": "...",
            "accessToken": "..."
        },
        "credentialType": "oauth"
    }],
    ...
}

turnserver 总是在 turnusers_lt 表中查找并返回授权。如果我使用长期凭据,它就像一个魅力。

我认为设置是错误的,但我在文档中的任何地方都找不到如何正确设置 turnserver 的示例

【问题讨论】:

    标签: oauth webrtc stun turn coturn


    【解决方案1】:

    您是否在 Chrome 中进行测试?它和 Firefox 都不支持 TURN 的 oauth,请参阅 here

    【讨论】:

    • 是的,我正在使用 chrome。我会尝试其他浏览器,但从没想过浏览器是问题
    • 问题是有人如何使用 oAuth 实现 WebRTC,也许将 accessToken 作为查询参数发送,然后使用 nginx 重写数据?
    猜你喜欢
    • 1970-01-01
    • 2021-04-15
    • 2022-06-30
    • 1970-01-01
    • 2015-02-02
    • 2020-11-21
    • 1970-01-01
    • 1970-01-01
    • 2015-06-27
    相关资源
    最近更新 更多