From 96a96f48656e1360e2406e8736d437af37826bad Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 22 Mar 2021 17:45:44 -0400 Subject: [PATCH] add jwt token as a std:;string --- src/zm_rtsp_server_authenticator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zm_rtsp_server_authenticator.h b/src/zm_rtsp_server_authenticator.h index 9908327d3..5793feb32 100644 --- a/src/zm_rtsp_server_authenticator.h +++ b/src/zm_rtsp_server_authenticator.h @@ -45,10 +45,10 @@ class ZM_RtspServer_Authenticator : public xop::Authenticator { if (query.has("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")) { 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) { if (query.has("username")) { std::string username = query.get("username")->firstValue();