From 6c03ef8ae75b35ea77dd54cb8cf3c184cd0a2559 Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Fri, 17 May 2024 18:41:34 +0200 Subject: [PATCH] Add setAuthentication(const String& username, const String& password) --- src/ESPAsyncWebServer.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ESPAsyncWebServer.h b/src/ESPAsyncWebServer.h index ba3841a..6f4000c 100644 --- a/src/ESPAsyncWebServer.h +++ b/src/ESPAsyncWebServer.h @@ -363,6 +363,7 @@ class AsyncWebHandler { AsyncWebHandler():_username(""), _password(""){} AsyncWebHandler& setFilter(ArRequestFilterFunction fn) { _filter = fn; return *this; } AsyncWebHandler& setAuthentication(const char *username, const char *password){ _username = String(username);_password = String(password); return *this; }; + AsyncWebHandler& setAuthentication(const String& username, const String& password){ _username = username;_password = password; return *this; }; bool filter(AsyncWebServerRequest *request){ return _filter == NULL || _filter(request); } virtual ~AsyncWebHandler(){} virtual bool canHandle(AsyncWebServerRequest *request __attribute__((unused))){