diff --git a/src/AutoConnectPage.cpp b/src/AutoConnectPage.cpp index 32ab578..77ed1ab 100644 --- a/src/AutoConnectPage.cpp +++ b/src/AutoConnectPage.cpp @@ -1573,8 +1573,8 @@ PageElement* AutoConnect::_setupPage(String& uri) { * Allow the page set upped to authenticate. * The argument parameter indicates that authentication is allowed with * the condition of the AutoConnect.authScope setting. - * It determines to except authentication in the captive portal state - * when the EXCEPTCP is enabled. + * It determines to admit authentication in the captive portal state + * when the AP_AUTHSCOPE_WITHCP is enabled. * @param allow Indication of whether to authenticate with the page. */ void AutoConnect::_authentication(bool allow) { @@ -1587,7 +1587,7 @@ void AutoConnect::_authentication(bool allow) { if (WiFi.status() != WL_CONNECTED && (WiFi.getMode() & WIFI_AP)) { String accUrl = _webServer->hostHeader(); if ((accUrl != WiFi.softAPIP().toString()) && !accUrl.endsWith(F(".local"))) { - if (_apConfig.authScope & AC_AUTHSCOPE_EXCEPTCP) + if (_apConfig.authScope & !AC_AUTHSCOPE_WITHCP) allow = false; } } diff --git a/src/AutoConnectTypes.h b/src/AutoConnectTypes.h index 168755c..3a3c189 100644 --- a/src/AutoConnectTypes.h +++ b/src/AutoConnectTypes.h @@ -52,7 +52,7 @@ typedef enum AC_AUTHSCOPE { AC_AUTHSCOPE_AUX = 0x0002, // All AUX-pages are affected by an authentication. AC_AUTHSCOPE_AC = 0x0004, // Allow authentication to AutoConnect pages. AC_AUTHSCOPE_PORTAL = AC_AUTHSCOPE_AC | AC_AUTHSCOPE_AUX, // All AutoConnect pages are affected by an authentication. - AC_AUTHSCOPE_EXCEPTCP = 0x8000 // Ignore authentication even if AP only. + AC_AUTHSCOPE_WITHCP = 0x8000 // Allows authenticating in the standalone state. } AC_AUTHSCOPE_t; /**< A type to enable authentication. */