mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
git-subtree-dir: login_server git-subtree-mainline: 09ebb40de21084bb10ee466429d900a5e757d349 git-subtree-split: ca71af1817a801db9a108c205bc298250d498c4b
41 lines
980 B
C++
41 lines
980 B
C++
#ifndef Elopage_Webhook_INCLUDED
|
|
#define Elopage_Webhook_INCLUDED
|
|
|
|
|
|
#include "PageRequestMessagedHandler.h"
|
|
#include "../tasks/CPUTask.h"
|
|
#include "../lib/ErrorList.h"
|
|
|
|
#include "Poco/Net/NameValueCollection.h"
|
|
|
|
class ElopageWebhook : public PageRequestMessagedHandler
|
|
{
|
|
public:
|
|
void handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Net::HTTPServerResponse& response);
|
|
};
|
|
|
|
class HandleElopageRequestTask : public UniLib::controller::CPUTask, protected ErrorList
|
|
{
|
|
public:
|
|
HandleElopageRequestTask(Poco::Net::NameValueCollection& requestData);
|
|
|
|
|
|
const char* getResourceType() const { return "HandleElopageRequestTask"; };
|
|
int run();
|
|
|
|
protected:
|
|
|
|
// return true if at least one entry in db with this email exist
|
|
bool validateInput();
|
|
void writeUserIntoDB();
|
|
int getUserIdFromDB(bool checkEmail = false);
|
|
|
|
Poco::Net::NameValueCollection mRequestData;
|
|
std::string mEmail;
|
|
std::string mFirstName;
|
|
std::string mLastName;
|
|
};
|
|
|
|
|
|
#endif // Elopage_Webhook_INCLUDED
|