use PSRAM in AsyncJsonResponse

This commit is contained in:
proddy
2026-05-17 16:19:54 +02:00
parent 144d6589ef
commit 90894898c2
18 changed files with 179 additions and 21 deletions

View File

@@ -1,5 +1,7 @@
#include "AuthenticationService.h"
#include "../core/psram_async_json_response.h"
AuthenticationService::AuthenticationService(AsyncWebServer * server, SecurityManager * securityManager)
: _securityManager(securityManager) {
// none of these need authentication
@@ -23,7 +25,7 @@ void AuthenticationService::signIn(AsyncWebServerRequest * request, JsonVariant
Authentication authentication = _securityManager->authenticate(username, password);
if (authentication.authenticated) {
User * user = authentication.user;
auto * response = new AsyncJsonResponse(false);
auto * response = new emsesp::PsramAsyncJsonResponse(false);
JsonObject jsonObject = response->getRoot();
jsonObject["access_token"] = _securityManager->generateJWT(user);
response->setLength();