implement EthWebServer

This commit is contained in:
technyon
2022-04-28 23:26:21 +02:00
parent 46e49f2118
commit 0dd94a97a3
6 changed files with 100 additions and 17 deletions

View File

@@ -17,9 +17,14 @@ bool EthWebServer::authenticate(const char *username, const char *password)
return _server.authenticate(username, password);
}
void EthWebServer::requestAuthentication(HTTPAuthMethod mode, const char *realm, const String &authFailMsg)
void EthWebServer::requestAuthentication(int mode, const char *realm, const String &authFailMsg)
{
return _server.requestAuthentication(mode, realm, authFailMsg);
return _server.requestAuthentication((HTTPAuthMethod)mode, realm, authFailMsg);
}
void EthWebServer::requestAuthentication()
{
return requestAuthentication(HTTPAuthMethod::BASIC_AUTH, "*", "Authentication failed");
}
void EthWebServer::send(int code, const char *content_type, const String &content)
@@ -32,11 +37,6 @@ void EthWebServer::on(const Uri &uri, EthernetWebServer::THandlerFunction handle
_server.on(uri, handler);
}
void EthWebServer::requestAuthentication()
{
}
int EthWebServer::args()
{
return _server.args();