code: public boolean userHasLock(String username) {
          Objects.requireNonNull(username, Required.USERNAME.toString());
          boolean lock = false;
          
          Config config = Application.getInstance(Config.class);
          Cache cache = Application.getInstance(CacheProvider.class).getCache(CacheName.AUTH);
          AtomicInteger counter = cache.getCounter(username);
          if (counter != null && counter.get() > config.getAuthenticationLock()) {
              lock = true;
          }
          
          return lock;
      }
docs: Checks if a username is locked because of to many failed login attempts
  
  @param username The username to check
  @return true if the user has a lock, false otherwise