23 linhas
444 B
C++
23 linhas
444 B
C++
#ifndef HANDLERLOGIN_H
|
|
#define HANDLERLOGIN_H
|
|
#include <vector>
|
|
#include "handler.h"
|
|
|
|
class HandlerLogin : public Handler
|
|
{
|
|
private:
|
|
bool isBanned(std::string ip);
|
|
void incFailureCount(std::string ip);
|
|
std::vector<char> pbkdf5(std::string password, const std::vector<char> &salt);
|
|
|
|
public:
|
|
HandlerLogin();
|
|
Response handle(const Request &r) override;
|
|
~HandlerLogin() override
|
|
{
|
|
}
|
|
using Handler::Handler;
|
|
};
|
|
|
|
#endif // HANDERLOGIN_H
|