@Override
  public void loginSuccess(HttpRequest request, @Nullable String login, Source source) {
    checkRequest(request);
    requireNonNull(source, "source can't be null");
    LOGGER.atDebug().setMessage("login success [method|{}][provider|{}|{}][IP|{}|{}][login|{}]")
      .addArgument(source::getMethod)
      .addArgument(source::getProvider)
      .addArgument(source::getProviderName)
      .addArgument(request::getRemoteAddr)
      .addArgument(() -> getAllIps(request))
      .addArgument(() -> preventLogFlood(sanitizeLog(emptyIfNull(login))))
      .log();
  }
@Test
  public void login_success_prevents_log_flooding_on_login_starting_from_128_chars() {
    underTest.loginSuccess(mockRequest(), LOGIN_129_CHARS, Source.realm(Method.BASIC, "some provider name"));

    verifyLog("login success [method|BASIC][provider|REALM|some provider name][IP||][login|012345678901234567890123456789012345678901234567890123456789" +
      "01234567890123456789012345678901234567890123456789012345678901234567...(129)]",
      Set.of("logout", "login failure"));
  }