This commit is contained in:
tablatronix
2021-04-13 14:40:06 -05:00
parent 87fcf08ee0
commit 4d37843af8
3 changed files with 7 additions and 38 deletions
+5
View File
@@ -1173,13 +1173,16 @@ void WiFiManager::handleRequest() {
// bool authenticateDigest(const String& username, const String& H1);
// void requestAuthentication(HTTPAuthMethod mode = BASIC_AUTH, const char* realm = NULL, const String& authFailMsg = String("") );
// 2.3 NO AUTH available
bool testauth = false;
if(!testauth) return;
DEBUG_WM(DEBUG_DEV,F("DOING AUTH"));
bool res = server->authenticate("admin","12345");
if(!res){
#ifndef WM_NOAUTH
server->requestAuthentication(HTTPAuthMethod::BASIC_AUTH); // DIGEST_AUTH
#endif
DEBUG_WM(DEBUG_DEV,F("AUTH FAIL"));
}
}
@@ -2024,11 +2027,13 @@ String WiFiManager::getInfoData(String id){
}
#endif
#ifdef ESP8266
#ifndef WM_NOSOFTAPSSID
else if(id==F("apssid")){
p = FPSTR(HTTP_INFO_apssid);
p.replace(FPSTR(T_1),htmlEntities(WiFi.softAPSSID()));
}
#endif
#endif
else if(id==F("apbssid")){
p = FPSTR(HTTP_INFO_apbssid);
p.replace(FPSTR(T_1),(String)WiFi.BSSIDstr());
+2
View File
@@ -34,6 +34,8 @@
#warning "ARDUINO_ESP8266_RELEASE_2_3_0, some WM features disabled"
#define WM_NOASYNC // esp8266 no async scan wifi
#define WM_NOCOUNTRY // esp8266 no country
#define WM_NOAUTH // no httpauth
#define WM_NOSOFTAPSSID // no softapssid() @todo shim
#endif
// #include "soc/efuse_reg.h" // include to add efuse chip rev to info, getChipRevision() is almost always the same though, so not sure why it matters.
-38
View File
@@ -1,38 +0,0 @@
# 1 "/var/folders/6g/ljwft31n7r5g593rqjywgvmh0000gn/T/tmpg1WvI3"
#include <Arduino.h>
# 1 "/Users/alverson/projects/microcontrollers/dev/libraries/WiFiManager/examples/Basic/Basic.ino"
#include <WiFiManager.h>
void setup();
void loop();
#line 3 "/Users/alverson/projects/microcontrollers/dev/libraries/WiFiManager/examples/Basic/Basic.ino"
void setup() {
WiFi.mode(WIFI_STA);
Serial.begin(115200);
WiFiManager wm;
# 22 "/Users/alverson/projects/microcontrollers/dev/libraries/WiFiManager/examples/Basic/Basic.ino"
bool res;
res = wm.autoConnect("AutoConnectAP","password");
if(!res) {
Serial.println("Failed to connect");
}
else {
Serial.println("connected...yeey :)");
}
}
void loop() {
}