core: move away from db towards hash-based auth
This commit is contained in:
1 parent
5f20698aa6
commit
c3975b27f1
13 files changed
+444
-429
No files matched your search
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
class CChallenge {
|
||||
public:
|
||||
CChallenge(const std::string& fingerprint, const std::string& challenge, int difficulty);
|
||||
CChallenge(const std::string& jsonResponse);
|
||||
|
||||
std::string fingerprint() const;
|
||||
std::string challenge() const;
|
||||
std::string signature() const;
|
||||
bool valid() const;
|
||||
|
||||
private:
|
||||
std::string getSigString();
|
||||
|
||||
std::string m_sig, m_fingerprint, m_challenge;
|
||||
bool m_valid = false;
|
||||
int m_difficulty = 4;
|
||||
|
||||
struct SChallengeJSON {
|
||||
std::string fingerprint, challenge, sig;
|
||||
int difficulty = 4, solution = 0;
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user