public static boolean handleRedirect()

in src/main/java/org/apache/sling/auth/core/spi/DefaultAuthenticationFeedbackHandler.java [77:99]


    public static boolean handleRedirect(final HttpServletRequest request, final HttpServletResponse response) {

        final String redirect = getValidatedRedirectTarget(request);
        if (redirect != null) {
            // and redirect ensuring the response is sent to the client
            try {
                response.sendRedirect(redirect);
            } catch (Exception e) {
                // expected: IOException and IllegalStateException
                LoggerFactory.getLogger(DefaultAuthenticationFeedbackHandler.class)
                        .error(
                                "handleRedirect: Failed to send redirect to " + redirect
                                        + ", aborting request without redirect",
                                e);
            }

            // consider the request done
            return true;
        }

        // no redirect requested
        return false;
    }