diff options
Diffstat (limited to 'subprojects/battleNetApi/include')
| -rw-r--r-- | subprojects/battleNetApi/include/token.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/subprojects/battleNetApi/include/token.hpp b/subprojects/battleNetApi/include/token.hpp index 0b66f53..e1544e8 100644 --- a/subprojects/battleNetApi/include/token.hpp +++ b/subprojects/battleNetApi/include/token.hpp @@ -3,18 +3,20 @@ class Token { public: - Token(const std::string &iTokenFilePath); + Token(const std::string &iTokenFilePath, const std::string &iUsername, const std::string &iPassword); std::string toString() const; private: const std::string mFilePath; //!< Path to the token file const std::string mToken; //!< Token value + const std::string mUsername; //!< Username for Battle.net API + const std::string mPassword; //!< Password for Battle.net API std::string getValidToken() const; void refreshToken() const; void writeNewTokenToFile() const; void writeTokenToFile(const std::string &iToken) const; - std::string getValidTokenWithApi(const std::string &iUser, const std::string &iPassword) const; + std::string getValidTokenWithApi() const; std::chrono::seconds getCurrentTime() const; std::string extractFirstMatchRegex(const std::string &t_str, const std::string &t_regex) const; static size_t curlCallbackStringOutput(void *t_contents, size_t t_size, size_t t_nmemb, std::string *t_s); |
