private static String getRequestBody(final HttpServletRequest request) {
        val body = readRequestBodyIfAny(request);
        if (!StringUtils.hasText(body)) {
            LOGGER.trace("Looking at the request attribute [{}] to locate SAML request body",
                SamlProtocolConstants.PARAMETER_SAML_REQUEST);
            return (String) request.getAttribute(SamlProtocolConstants.PARAMETER_SAML_REQUEST);
        }
        return body;
    }
Gets the request body from the request.

@param request the request
@return the request body
support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/authentication/principal/SamlServiceFactory.java