protected byte[] getBase64DecodedMessage() throws MessageDecodingException {
        Optional<String> encodedMessage = Optional.empty();
        for (val parameter : SAML_PARAMETERS) {
            encodedMessage = this.callContext.webContext().getRequestParameter(parameter);
            if (encodedMessage.isPresent()) {
                break;
            }
        }
        if (encodedMessage.isEmpty()) {
            encodedMessage = Optional.ofNullable(this.callContext.webContext().getRequestContent());
            // we have a body, it may be the SAML request/response directly
            // but we also try to parse it as a list key=value where the value is the SAML request/response
            if (encodedMessage.isPresent()) {
                val a = URLEncodedUtils.parse(encodedMessage.get(), StandardCharsets.UTF_8);
                final Multimap<String, String>  paramMap = HashMultimap.create();
                for (val p : a) {
                    paramMap.put(p.getName(), p.getValue());
                }
                for (val parameter : SAML_PARAMETERS) {
                    val newEncodedMessageCollection = paramMap.get(parameter);
                    if (newEncodedMessageCollection != null && !newEncodedMessageCollection.isEmpty()) {
                        encodedMessage = Optional.of(newEncodedMessageCollection.iterator().next());
                        break;
                    }
                }
            }
        }

        if (encodedMessage.isEmpty()) {
            throw new MessageDecodingException("Request did not contain either a SAMLRequest parameter, a SAMLResponse parameter, "
                + "a logoutRequest parameter or a body content");
        } else {
            if (encodedMessage.get().contains("<")) {
                LOGGER.trace("Raw SAML message:\n{}", encodedMessage);
                return encodedMessage.get().getBytes(StandardCharsets.UTF_8);
            } else {

                try {
                    val decodedBytes = Base64Support.decode(encodedMessage.get());
                    LOGGER.trace("Decoded SAML message:\n{}", new String(decodedBytes, StandardCharsets.UTF_8));
                    return decodedBytes;
                } catch (final Exception e) {
                    throw new MessageDecodingException(e);
                }
            }
        }
    }
<p>getBase64DecodedMessage.</p>

@return an array of {@link byte} objects
@throws MessageDecodingException if any.
pac4j-saml/src/main/java/org/pac4j/saml/transport/AbstractPac4jDecoder.java