Add a preliminary gRPC service for dealing with calling credentials

This commit is contained in:
Jon Chambers
2023-08-01 16:34:36 -04:00
committed by Jon Chambers
parent 6a3ecb2881
commit 95b90e7c5a
3 changed files with 191 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
syntax = "proto3";
option java_multiple_files = true;
package org.signal.chat.calling;
/**
* Provides methods for getting credentials for one-on-one and group calls.
*/
service Calling {
/**
* Generates and returns TURN credentials for the caller.
*
* This RPC may fail with a `RESOURCE_EXHAUSTED` status if a rate limit for
* generating TURN credentials has been exceeded, in which case a
* `retry-after` header containing an ISO 8601 duration string will be present
* in the response trailers.
*/
rpc GetTurnCredentials(GetTurnCredentialsRequest) returns (GetTurnCredentialsResponse) {}
}
message GetTurnCredentialsRequest {}
message GetTurnCredentialsResponse {
/**
* A username that can be presented to authenticate with a TURN server.
*/
string username = 1;
/**
* A password that can be presented to authenticate with a TURN server.
*/
string password = 2;
/**
* A list of TURN (or TURNS or STUN) servers where the provided credentials
* may be used.
*/
repeated string urls = 3;
}