1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

WHIP: Improve WHIP deletion by token verification. v5.0.164, v6.0.58 (#3595)

------

Co-authored-by: chundonglinlin <chundonglinlin@163.com>
This commit is contained in:
Winlin 2023-07-01 19:08:21 +08:00 committed by GitHub
parent fe230365ab
commit b1d1c7abe5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 32 additions and 7 deletions

View file

@ -444,6 +444,8 @@ private:
private:
// The local:remote username, such as m5x0n128:jvOm where local name is m5x0n128.
std::string username_;
// The random token to verify the WHIP DELETE request etc.
std::string token_;
// A group of networks, each has its own DTLS and SRTP context.
SrsRtcNetworks* networks_;
private:
@ -484,6 +486,8 @@ public:
void set_state_as_waiting_stun();
// Get username pair for this connection, used as ID of session.
std::string username();
// Get the token for verify this session, for example, when delete session by WHIP API.
std::string token();
public:
virtual ISrsKbpsDelta* delta();
// Interface ISrsResource.