From ac4f628a58e99c38bd726ceb5bf47f804f97437d Mon Sep 17 00:00:00 2001 From: Mike Beattie Date: Fri, 30 Mar 2012 10:42:26 +1300 Subject: Begin adding Base64 support for http auth. Signed-off-by: Mike Beattie --- HouseControl.ino | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/HouseControl.ino b/HouseControl.ino index 369f84d..9212d43 100644 --- a/HouseControl.ino +++ b/HouseControl.ino @@ -7,12 +7,14 @@ */ #define WEBDUINO_FAVICON_DATA "" +#define WEBDUINO_AUTH_REALM "DoorControl" #include #include #include #include #include +#include #include #include @@ -311,6 +313,8 @@ void doHandler(WebServer &server, WebServer::ConnectionType type, char *url_tail void configHandler(WebServer &server, WebServer::ConnectionType type, char *url_tail, bool tail_complete) { + //base64_encode((char*)buf1, "user:pass", 9); + //if (!server.checkCredentials((const char*)buf1)) { server.httpUnauthorized(); return; } /* for a GET or HEAD, send the standard "it's all OK headers" */ server.httpSuccess("text/html; charset=iso-8859-1", "Content-Encoding: gzip\r\n"); -- cgit v1.2.3