| 142 | } |
| 143 | |
| 144 | bool WebServer::authenticate(const char *_username, const char *_password) { |
| 145 | return WebServer::authenticate([_username, _password](HTTPAuthMethod mode, String username, String params[]) -> String * { |
| 146 | (void)mode; |
| 147 | (void)params; |
| 148 | return username.equalsConstantTime(_username) ? new String(_password) : NULL; |
| 149 | }); |
| 150 | } |
| 151 | |
| 152 | bool WebServer::authenticate(THandlerFunctionAuthCheck fn) { |
| 153 | if (!hasHeader(FPSTR(AUTHORIZATION_HEADER))) { |
no test coverage detected