@SneakyThrows(InterruptedException.class)
    public static void login(String username, String password, boolean rememberMe) {
        try {
            SecurityUtils.getSubject().login(new UsernamePasswordToken(username, password, rememberMe));
            redirectToSaved(Faces.getRequestAttribute(LOGIN_PREDICATE_ATTR_NAME), "/");
        } catch (AuthenticationException e) {
            Faces.setFlashAttribute(DEFAULT_ERROR_KEY_ATTRIBUTE_NAME, e);
            int loginFailedWaitTime = Faces.getRequestAttribute(LOGIN_WAITTIME_ATTR_NAME);
            if (loginFailedWaitTime != 0) {
                TimeUnit.SECONDS.sleep(loginFailedWaitTime);
            }
            redirectToView();
        }
    }
manually login, used via {@link PassThruAuthenticationFilter}
@param username
@param password
@param rememberMe
support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/Forms.java