protected HttpAction getFinalActionForFrontChannelLogout(final WebContext context) {
        val relayStateValue = context.getRequestParameter(CasConfiguration.RELAY_STATE_PARAMETER);
        // if we have a state value -> redirect to the CAS server to continue the logout process
        if (relayStateValue.isPresent()) {
            val buffer = new StringBuilder();
            buffer.append(configuration.getPrefixUrl());
            if (!configuration.getPrefixUrl().endsWith("/")) {
                buffer.append("/");
            }
            buffer.append("logout?_eventId=next&");
            buffer.append(CasConfiguration.RELAY_STATE_PARAMETER);
            buffer.append("=");
            buffer.append(CommonHelper.urlEncode(relayStateValue.get()));
            val redirectUrl = buffer.toString();
            LOGGER.debug("Redirection url to the CAS server: {}", redirectUrl);
            return HttpActionHelper.buildRedirectUrlAction(context, redirectUrl);
        } else {
            return new OkAction(Pac4jConstants.EMPTY_STRING);
        }
    }
<p>getFinalActionForFrontChannelLogout.</p>

@param context a {@link WebContext} object
@return a {@link HttpAction} object
pac4j-cas/src/main/java/org/pac4j/cas/logout/processor/CasLogoutProcessor.java