ESP32: починить JSON auth для homeserver sessionType

This commit is contained in:
AidarKC 2026-06-13 15:22:19 +04:00
parent 81d1b84a7d
commit 0536a018c6

View File

@ -3193,7 +3193,7 @@ static bool ensureShineSessionAuthenticated(String &errorOut) {
+ "\",\"sessionKey\":\"" + jsonEscape(sessionKey) + "\",\"sessionKey\":\"" + jsonEscape(sessionKey)
+ "\",\"timeMs\":" + String((unsigned long long)timeMs) + "\",\"timeMs\":" + String((unsigned long long)timeMs)
+ ",\"signatureB64\":\"" + jsonEscape(bytesToBase64String(signature, 64)) + ",\"signatureB64\":\"" + jsonEscape(bytesToBase64String(signature, 64))
+ ",\"sessionType\":" + String((unsigned int)kSessionTypeHomeserver) + "\",\"sessionType\":" + String((unsigned int)kSessionTypeHomeserver)
+ ",\"clientPlatform\":\"" + jsonEscape(kSessionClientPlatformEsp32) + ",\"clientPlatform\":\"" + jsonEscape(kSessionClientPlatformEsp32)
+ "\",\"clientInfo\":\"ESP32 homeserver\"}"; + "\",\"clientInfo\":\"ESP32 homeserver\"}";
String loginResp; String loginResp;
@ -3260,7 +3260,7 @@ static bool ensureShineSessionAuthenticated(String &errorOut) {
+ ",\"authNonce\":\"" + jsonEscape(authNonce) + ",\"authNonce\":\"" + jsonEscape(authNonce)
+ "\",\"deviceKey\":\"" + jsonEscape(bytesToBase64String(devicePub, 32)) + "\",\"deviceKey\":\"" + jsonEscape(bytesToBase64String(devicePub, 32))
+ "\",\"signatureB64\":\"" + jsonEscape(bytesToBase64String(signature, 64)) + "\",\"signatureB64\":\"" + jsonEscape(bytesToBase64String(signature, 64))
+ ",\"sessionType\":" + String((unsigned int)kSessionTypeHomeserver) + "\",\"sessionType\":" + String((unsigned int)kSessionTypeHomeserver)
+ ",\"clientPlatform\":\"" + jsonEscape(kSessionClientPlatformEsp32) + ",\"clientPlatform\":\"" + jsonEscape(kSessionClientPlatformEsp32)
+ "\",\"clientInfo\":\"ESP32 homeserver\"}"; + "\",\"clientInfo\":\"ESP32 homeserver\"}";
String createResp; String createResp;