TURN: The timestamp is actually the expiry time
Make sure to add the TTL to the current time, so the generated expiry time is in the future.
This commit is contained in:
parent
dfa9fd00e2
commit
0a6d03ca79
@ -24,8 +24,8 @@ public class TurnServer {
|
||||
TurnEntry turn = null;
|
||||
|
||||
try {
|
||||
Long timestamp = System.currentTimeMillis() / 1000;
|
||||
String username = timestamp + COLON + userId;
|
||||
long expiryTime = System.currentTimeMillis() / 1000 + ttl;
|
||||
String username = expiryTime + COLON + userId;
|
||||
String password = calculateRFC2104HMAC(username, secretKey);
|
||||
turn = new TurnEntry(username, password, ttl, url);
|
||||
} catch (SignatureException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user