mirror of
https://github.com/me-no-dev/ESPAsyncWebServer.git
synced 2025-08-24 06:50:57 +02:00
Add setAuthentication(const String& username, const String& password)
This commit is contained in:
@@ -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))){
|
||||
|
Reference in New Issue
Block a user