aqhome: more work on http service.

This commit is contained in:
Martin Preuss
2023-08-07 14:08:52 +02:00
parent 6269431467
commit 1efcd09f0c
20 changed files with 2375 additions and 227 deletions

View File

@@ -0,0 +1,45 @@
/****************************************************************************
* This file is part of the project AqHome.
* AqHome (c) by 2023 Martin Preuss, all rights reserved.
*
* The license for this file can be found in the file COPYING which you
* should have received along with this file.
****************************************************************************/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "aqhome/http/httpservice_login.h"
#include "aqhome/http/httpservice_p.h"
#include <gwenhywfar/db.h>
#include <gwenhywfar/buffer.h>
#include <gwenhywfar/text.h>
#include <gwenhywfar/debug.h>
/*
Login process:
- GET: send a login page
- POST:
- get USER and PASS
- look for user (maybe add virtual function to load a user?)
- check password
- if all okay:
- create session
- add header "set-cookie"
- redirect to main page
*/
GWEN_MSG *AQH_HttpService_HandleLoginUrl(AQH_SERVICE *sv, const GWEN_MSG *msgReceived, const GWEN_URL *url)
{
}