public boolean isTheClientIPBlocked(String clientIP){
  try {
    if (null != clientIP && !clientIP.isEmpty()) {
      String zkPath=getZkPath(clientIP);
      InvalidLogins invLogins=(InvalidLogins)_distDataManager.getData(zkPath,false);
      if (null != invLogins) {
        if (isClientInvalidRecordExpired(invLogins)) {
          removeInvalidRecord(clientIP);
          return false;
        }
        if (invLogins.getLoginAttempts() < _maxAuthnLoginAttemtsCount) {
          return false;
        }
      }
 else {
        return false;
      }
      _log.error("The client IP is blocked, too many error logins from that IP: {}",clientIP);
    }
 else {
      _log.error("The provided client IP is null or empty.");
    }
  }
 catch (  Exception ex) {
    _log.error("Failed to check the error login count",ex);
  }
  return true;
}

public boolean isTheClientIPBlocked ( String clientIP ) { try { if ( null != clientIP && ! clientIP . isEmpty ( ) ) { String zkPath = getZkPath ( clientIP ) ; InvalidLogins invLogins = ( InvalidLogins ) _distDataManager . getData ( zkPath , false ) ; if ( null != invLogins ) { if ( isClientInvalidRecordExpired ( invLogins ) ) { removeInvalidRecord ( clientIP ) ; return false ; } if ( invLogins . getLoginAttempts ( ) < _maxAuthnLoginAttemtsCount ) { return false ; } } else { return false ; } _log . error ( "The client IP is blocked, too many error logins from that IP: {}" , clientIP ) ; } else { _log . error ( "The provided client IP is null or empty." ) ; } } catch ( Exception ex ) { _log . error ( "Failed to check the error login count" , ex ) ; } return true ; }
check if the client ip is blocked . it is blocked if there are too many invalid logins from that ip . the default value for this parameter is 10 .
