WebSocketProtocol: Remove availableRequests from Hello

This commit is contained in:
tt2468 2021-06-05 23:54:11 -07:00
parent a363a0865b
commit d3c7f4b3fd
4 changed files with 1 additions and 14 deletions

View File

@ -299,7 +299,6 @@ The following message types are the base message types which may be sent to and
{
"obsWebsocketVersion": string,
"rpcVersion": number,
"availableRequests": array<string>,
"authentication": object(optional)
}
```
@ -312,7 +311,6 @@ Authentication is required
"messageType": "Hello",
"websocketVersion": "5.0.0",
"rpcVersion": 1,
"availableRequests": ["GetVersion"],
"authentication": {
"challenge": "+IxH4CnCiqpX1rM9scsNynZzbOe4KhDeYcTNS3PDaeY=",
"salt": "lM1GncleQOaCu9lT1yeUZhFYnqhsLLP1G5lAGo3ixaI="
@ -325,8 +323,7 @@ Authentication is not required
{
"messageType": "Hello",
"websocketVersion": "5.0.0",
"rpcVersion": 1,
"availableRequests": ["GetVersion"]
"rpcVersion": 1
}
```

View File

@ -235,10 +235,3 @@ WebSocketProtocol::ProcessResult WebSocketProtocol::ProcessMessage(SessionPtr se
return ret;
}
std::vector<std::string> WebSocketProtocol::GetRequestList()
{
RequestHandler requestHandler;
return requestHandler.GetRequestList();
}

View File

@ -19,6 +19,4 @@ namespace WebSocketProtocol {
};
ProcessResult ProcessMessage(SessionPtr session, json incomingMessage);
std::vector<std::string> GetRequestList();
}

View File

@ -273,7 +273,6 @@ void WebSocketServer::onOpen(websocketpp::connection_hdl hdl)
helloMessage["messageType"] = "Hello";
helloMessage["obsWebSocketVersion"] = OBS_WEBSOCKET_VERSION;
helloMessage["rpcVersion"] = OBS_WEBSOCKET_RPC_VERSION;
helloMessage["availableRequests"] = WebSocketProtocol::GetRequestList();
if (AuthenticationRequired) {
session->SetSecret(AuthenticationSecret);
std::string sessionChallenge = Utils::Crypto::GenerateSalt();