1
0
mirror of https://github.com/s00500/ESPUI.git synced 2025-07-04 06:10:18 +00:00

#44 Adding Basic Auth

- Also authing websockets
- Implemented on begin and beginSpiffs
- Added notes to Gui example
This commit is contained in:
2018-12-26 13:38:38 +01:00
parent f31575b50c
commit 7a10457f99
3 changed files with 90 additions and 10 deletions

View File

@ -101,8 +101,12 @@ typedef struct Control {
class ESPUIClass {
public:
void begin(const char *_title); // Setup servers and page in Memorymode
void begin(const char *_title); // Setup servers and page in Memorymode
void begin(const char *_title, const char *username, const char *password);
void beginSPIFFS(const char *_title); // Setup servers and page in SPIFFSmode
void beginSPIFFS(const char *_title, const char *username,
const char *password);
void prepareFileSystem(); // Initially preps the filesystem and loads a lot
// of stuff into SPIFFS
@ -160,6 +164,9 @@ class ESPUIClass {
bool labelExists(String label);
private:
const char *basicAuthUsername;
const char *basicAuthPassword;
bool basicAuth = true;
AsyncWebServer *server;
AsyncWebSocket *ws;
};