@Override
    protected String getRequestedService(final HttpServletRequest request) {
        if (request.getRequestURI().endsWith(CasProtocolConstants.ENDPOINT_LOGOUT)) {
            val service = logoutProperties.getRedirectParameter()
                .stream()
                .map(paramName -> {
                    LOGGER.trace("Using request parameter name [{}] to detect destination service, if any", paramName);
                    return request.getParameter(paramName);
                })
                .filter(Objects::nonNull)
                .findFirst()
                .orElse(StringUtils.EMPTY);
            LOGGER.trace("Located target service [{}] for redirection after logout", service);
            return service;
        }
        return null;
    }
This is {@link LogoutWebApplicationServiceFactory}.

@author Misagh Moayyed
@since 6.4.0
core/cas-server-core-logout-api/src/main/java/org/apereo/cas/logout/LogoutWebApplicationServiceFactory.java