MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / handlePendingTokenRequest

Method handlePendingTokenRequest

sources/base/AccessManager.cpp:187–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187void AccessManager::handlePendingTokenRequest(const QString& id, bool accept)
188{
189 if (_pendingRequests.contains(id))
190 {
191 AuthDefinition def = _pendingRequests.take(id);
192
193 if (accept)
194 {
195 const QString token = QUuid::createUuid().toString().remove("{").remove("}");
196 _authTable->createToken(token, def.comment, id);
197 emit SignalTokenNotifyClient(true, def.caller, token, def.comment, id, def.tan);
198 emit SignalTokenUpdated(getTokenList());
199 }
200 else
201 {
202 emit SignalTokenNotifyClient(false, def.caller, QString(), def.comment, id, def.tan);
203 }
204 }
205}
206
207QVector<AccessManager::AuthDefinition> AccessManager::getPendingRequests() const
208{

Callers

nothing calls this directly

Calls 2

toStringMethod · 0.45
createTokenMethod · 0.45

Tested by

no test coverage detected