Skip to content

Commit

Permalink
Update protocol and add nonce to SendDataRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloFuente committed Jan 28, 2025
1 parent 59c8b30 commit 7d66404
Show file tree
Hide file tree
Showing 3 changed files with 374 additions and 254 deletions.
3 changes: 3 additions & 0 deletions LivekitApi/RoomServiceClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Google.Protobuf;

namespace Livekit.Server.Sdk.Dotnet
{
Expand Down Expand Up @@ -140,6 +141,8 @@ UpdateSubscriptionsRequest request
/// </summary>
public async Task<SendDataResponse> SendData(SendDataRequest request)
{
// Add random nonce to request
request.Nonce = ByteString.CopyFrom(System.Guid.NewGuid().ToByteArray());
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
"Bearer",
AuthHeader(new VideoGrants { RoomAdmin = true, Room = request.Room })
Expand Down
Loading

0 comments on commit 7d66404

Please sign in to comment.