Added configurable basic auth to web server

This commit is contained in:
Gunnar Skjold
2020-01-15 21:22:06 +01:00
parent aeb161455e
commit 8f0932f1f1
5 changed files with 145 additions and 67 deletions

View File

@@ -25,8 +25,12 @@ public:
char* mqttPass;
byte meterType;
char* authUser;
char* authPass;
bool hasConfig();
bool isSecure();
bool isAuth();
bool save();
bool load();
@@ -35,7 +39,7 @@ protected:
private:
const int EEPROM_SIZE = 512;
const byte EEPROM_CHECK_SUM = 71; // Used to check if config is stored. Change if structure changes
const byte EEPROM_CHECK_SUM = 72; // Used to check if config is stored. Change if structure changes
const int EEPROM_CONFIG_ADDRESS = 0;
int saveString(int pAddress, char* pString);