pass jwt_token_str and key by ref for performance

This commit is contained in:
Isaac Connor
2022-07-14 09:46:24 -04:00
parent e38dd4649d
commit bc12205ec3

View File

@@ -14,7 +14,7 @@
// returns username if valid, "" if not
#if HAVE_LIBJWT
std::pair <std::string, unsigned int> verifyToken(std::string jwt_token_str, std::string key) {
std::pair <std::string, unsigned int> verifyToken(const std::string &jwt_token_str, const std::string &key) {
std::string username = "";
unsigned int token_issued_at = 0;
int err = 0;