openvidu-server,openvidu-node-client: Typos and missing parameter in openvidu-node-client for IceServerProperties

pull/701/head
cruizba 2022-02-25 16:24:27 +01:00
parent ead3252ce7
commit d32aefb900
3 changed files with 16 additions and 5 deletions

View File

@ -129,9 +129,12 @@ public class IceServerProperties {
/** /**
* Secret for TURN authentication based on: * Secret for TURN authentication based on:
* - https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00 * <ul>
* - https://www.ietf.org/proceedings/87/slides/slides-87-behave-10.pdf * <li><a href="https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00" target="_blank">https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00</a></li>
* This will generate credentials valid for 24 hours which is the recommended value * <li><a href="https://www.ietf.org/proceedings/87/slides/slides-87-behave-10.pdf" target="_blank">https://www.ietf.org/proceedings/87/slides/slides-87-behave-10.pdf</a></li>
* </ul>
* This will generate credentials valid for 24 hours which is the recommended value. You need to setup in your TURN service this same secret value
* which uses HMAC SHA1 as encryption algorithm. A TURN implementation which by default uses this is COTURN with static-auth-secret parameter.
*/ */
public IceServerProperties.Builder staticAuthSecret(String staticAuthSecret) { public IceServerProperties.Builder staticAuthSecret(String staticAuthSecret) {
this.staticAuthSecret = staticAuthSecret; this.staticAuthSecret = staticAuthSecret;
@ -318,7 +321,7 @@ public class IceServerProperties {
private void generateTURNCredentials() throws NoSuchAlgorithmException, InvalidKeyException { private void generateTURNCredentials() throws NoSuchAlgorithmException, InvalidKeyException {
// 1. Generate random username // 1. Generate random username
char[] ALPHANUMERIC =("abcdefghijklmnopqrstuvwxyzABCDEFGHIJK " + char[] ALPHANUMERIC =("abcdefghijklmnopqrstuvwxyzABCDEFGHIJK" +
"LMNOPQRSTUVWXYZ0123456789").toCharArray(); "LMNOPQRSTUVWXYZ0123456789").toCharArray();
int MAX_LENGTH = 8; int MAX_LENGTH = 8;
StringBuilder randomUsername = new StringBuilder(); StringBuilder randomUsername = new StringBuilder();

View File

@ -27,6 +27,14 @@ export interface IceServerProperties {
*/ */
url: string; url: string;
/**
* Secret for TURN authentication based on:
* - [https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00](https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00)
* - [https://www.ietf.org/proceedings/87/slides/slides-87-behave-10.pdf](https://www.ietf.org/proceedings/87/slides/slides-87-behave-10.pdf)
* This will generate credentials valid for 24 hours which is the recommended value
*/
staticAuthSecret?: string;
/** /**
* Set a username for the ICE Server you want to use. * Set a username for the ICE Server you want to use.
* This parameter should be defined only for TURN, not for STUN ICE Servers. * This parameter should be defined only for TURN, not for STUN ICE Servers.