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

Method checkAuthBlockTimeout

sources/base/AccessManager.cpp:273–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273void AccessManager::checkAuthBlockTimeout()
274{
275 // handle user auth block
276 QVector<uint64_t>::iterator itu = _userAuthAttempts.begin();
277 while (itu != _userAuthAttempts.end()) {
278 if (*itu < (uint64_t)InternalClock::now())
279 itu = _userAuthAttempts.erase(itu);
280 else
281 ++itu;
282 }
283
284 // handle token auth block
285 QVector<uint64_t>::iterator it = _tokenAuthAttempts.begin();
286 while (it != _tokenAuthAttempts.end()) {
287 if (*it < (uint64_t)InternalClock::now())
288 it = _tokenAuthAttempts.erase(it);
289 else
290 ++it;
291 }
292
293 // if the lists are empty we stop
294 if (_userAuthAttempts.empty() && _tokenAuthAttempts.empty())
295 _authBlockTimer->stop();
296}
297
298QString AccessManager::getID() const
299{

Callers

nothing calls this directly

Calls 2

beginMethod · 0.80
stopMethod · 0.45

Tested by

no test coverage detected