add jwt token as a std:;string

This commit is contained in:
Isaac Connor 2021-03-22 17:45:44 -04:00
parent 8bc22880a4
commit 96a96f4865
1 changed files with 2 additions and 2 deletions

View File

@ -45,10 +45,10 @@ class ZM_RtspServer_Authenticator : public xop::Authenticator {
if (query.has("jwt_token")) { if (query.has("jwt_token")) {
const QueryParameter *jwt_token = query.get("jwt_token"); const QueryParameter *jwt_token = query.get("jwt_token");
user = zmLoadTokenUser(jwt_token->firstValue().c_str(), false); user = zmLoadTokenUser(jwt_token->firstValue(), false);
} else if (query.has("token")) { } else if (query.has("token")) {
const QueryParameter *jwt_token = query.get("token"); const QueryParameter *jwt_token = query.get("token");
user = zmLoadTokenUser(jwt_token->firstValue().c_str(), false); user = zmLoadTokenUser(jwt_token->firstValue(), false);
} else if (strcmp(config.auth_relay, "none") == 0) { } else if (strcmp(config.auth_relay, "none") == 0) {
if (query.has("username")) { if (query.has("username")) {
std::string username = query.get("username")->firstValue(); std::string username = query.get("username")->firstValue();