MCPcopy Create free account
hub / github.com/Adaptix-Framework/AdaptixC2 / HttpReqJwtUpdate

Function HttpReqJwtUpdate

AdaptixClient/Source/Client/Requestor.cpp:69–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69bool HttpReqJwtUpdate(AuthProfile* profile)
70{
71 QJsonObject dataJson;
72 QByteArray jsonData = QJsonDocument(dataJson).toJson();
73
74 QString sUrl = profile->GetURL() + "/refresh";
75 QJsonObject jsonObject = HttpReq(sUrl, jsonData, profile->GetRefreshToken());
76 if ( jsonObject.contains("access_token") ) {
77 profile->SetAccessToken( jsonObject["access_token"].toString() );
78 return true;
79 }
80 return false;
81}
82
83bool HttpReqGetOTP(const QString &type, const QString &objectId, AuthProfile profile, QString* message, bool* ok)
84{

Callers 1

OnReconnectMethod · 0.85

Calls 6

HttpReqFunction · 0.85
GetURLMethod · 0.80
GetRefreshTokenMethod · 0.80
SetAccessTokenMethod · 0.80
toJsonMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected