coturn:如何为Turnserver身份验证rest api计算hmac密码

问题描述

我想使用转弯服务器rest api

turnserver.conf说

# TURN REST API flag.
# (Time Limited Long Term Credential)
# Flag that sets a special authorization option that is based upon authentication secret.
#
# This feature's purpose is to support "TURN Server REST API",see
# "TURN REST API" link in the project's page 
# https://github.com/coturn/coturn/
#
# This option is used with timestamp:
# 
# usercombo -> "timestamp:userid"
# turn user -> usercombo
# turn password -> base64(hmac(secret key,usercombo))
#
# This allows TURN credentials to be accounted for a specific user id.
# If you don't have a suitable id,then the timestamp alone can be used.
# This option is enabled by turning on secret-based authentication.
# The actual value of the secret is defined either by the option static-auth-secret,# or can be found in the turn_secret table in the database (see below).
# 
# Read more about it:
#  - https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00
#  - https://www.ietf.org/proceedings/87/slides/slides-87-behave-10.pdf
#
# Be aware that use-auth-secret overrides some parts of lt-cred-mech.
# The use-auth-secret feature depends internally on lt-cred-mech,so if you set
# this option then it automatically enables lt-cred-mech internally
# as if you had enabled both.
#
# Note that you can use only one auth mechanism at the same time! This is because,# both mechanisms conduct username and password validation in different ways.
# 
# Use either lt-cred-mech or use-auth-secret in the conf
# to avoid any confusion.
#
#use-auth-secret

现在我的问题是如何计算我知道的用户名和密码 这就是我们要做

usercombo -> "timestamp:userid"
# turn user -> usercombo
# turn password -> base64(hmac(secret key,usercombo))
#

但是实际上,如果我想像在Java中那样实用地计算它,

我将如何做并将其添加turnserver.conf中?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)