| 133 | } |
| 134 | |
| 135 | WebServerClass::THandlerFunction FSWebServer::authMiddleware(WebServerClass::THandlerFunction fn) |
| 136 | { |
| 137 | if (authUser.isEmpty() || m_apmode) |
| 138 | { |
| 139 | return fn; |
| 140 | } |
| 141 | |
| 142 | return [this, fn]() |
| 143 | { |
| 144 | if (!webserver->authenticate(authUser.c_str(), authPass.c_str())) |
| 145 | { |
| 146 | return webserver->requestAuthentication(); |
| 147 | } |
| 148 | |
| 149 | fn(); |
| 150 | }; |
| 151 | } |
| 152 | |
| 153 | void FSWebServer::setCaptiveWebage(const char *url) |
| 154 | { |
nothing calls this directly
no outgoing calls
no test coverage detected