diff options
Diffstat (limited to 'subprojects/battleNetApi/src/token.cpp')
| -rw-r--r-- | subprojects/battleNetApi/src/token.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/subprojects/battleNetApi/src/token.cpp b/subprojects/battleNetApi/src/token.cpp index 6a3ef24..d3b3054 100644 --- a/subprojects/battleNetApi/src/token.cpp +++ b/subprojects/battleNetApi/src/token.cpp @@ -68,14 +68,14 @@ std::string Token::getValidTokenWithApi() const { } } - return extractFirstMatchRegex(token_info, "\"access_token\":\"(\\w+)\""); + return extractTokenWithRegex(token_info, "\"access_token\":\"(\\w+)\""); } std::chrono::seconds Token::getCurrentTime() const { return std::chrono::duration_cast<std::chrono::seconds>(std::chrono::utc_clock::now().time_since_epoch()); } -std::string Token::extractFirstMatchRegex(const std::string &iText, const std::string &iRegex) const { +std::string Token::extractTokenWithRegex(const std::string &iText, const std::string &iRegex) const { std::regex regex(iRegex); auto aMatchBegin = std::sregex_iterator(iText.begin(), iText.end(), regex); auto aMatchEnd = std::sregex_iterator(); |
