@SneakyThrows(InterruptedException.class)
    public boolean onLoginFailure(AuthenticationToken token, AuthenticationException e,
                                  ServletRequest request, ServletResponse response) {
        if (loginFailedWaitTime != 0) {
            TimeUnit.SECONDS.sleep(loginFailedWaitTime);
        }
        return methods.onLoginFailure(token, e, request, response);
    }
in case the login link is clicked directly,
redirect to referer

@param request
@param response
@return
support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/AuthenticationFilterDelegate.java