pass jwt_token_str by reference

This commit is contained in:
Isaac Connor 2021-04-20 17:04:45 -04:00
parent 1f7da2835f
commit de661752ce
2 changed files with 2 additions and 2 deletions

View File

@ -133,7 +133,7 @@ User *zmLoadUser(const char *username, const char *password) {
return nullptr;
} // end User *zmLoadUser(const char *username, const char *password)
User *zmLoadTokenUser(std::string jwt_token_str, bool use_remote_addr) {
User *zmLoadTokenUser(const std::string &jwt_token_str, bool use_remote_addr) {
std::string key = config.auth_hash_secret;
std::string remote_addr = "";

View File

@ -66,7 +66,7 @@ class User {
User *zmLoadUser(const char *username, const char *password=0);
User *zmLoadAuthUser(const char *auth, bool use_remote_addr);
User *zmLoadTokenUser(std::string jwt, bool use_remote_addr);
User *zmLoadTokenUser(const std::string &jwt, bool use_remote_addr);
bool checkUser(const char *username);
bool checkPass(const char *password);