mirror of
https://gitee.com/openharmony/developtools_profiler
synced 2024-11-27 00:51:47 +00:00
新增token认证
Signed-off-by: s30035957 <sunwei158@huawei.com>
This commit is contained in:
parent
a46c2a3ba2
commit
ec26ca9d57
@ -94,7 +94,11 @@ public:
|
||||
{
|
||||
std::string token = recvStr.substr(recvStr.find_last_of(":") + 1);
|
||||
token = token.substr(0, token.find(' '));
|
||||
if (token != SPTask::GetInstance().GetTcpToken()) {
|
||||
std::string tcpToken = SPTask::GetInstance().GetTcpToken();
|
||||
if(tcpToken == "" && token == "-SESSIONID") {
|
||||
return OK;
|
||||
}
|
||||
if (token != tcpToken) {
|
||||
return TOKEN_CHECK_FAILED;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user