| 271 | } |
| 272 | |
| 273 | void 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 | |
| 298 | QString AccessManager::getID() const |
| 299 | { |