public static Optional<XMLObject> deserializeSamlObject(final String obj) {
        try (val reader = new StringReader(obj)) {
            return Optional.of(XMLObjectSupport.unmarshallFromReader(getParserPool(), reader));
        } catch (final Exception e) {
            LOGGER.error("Error unmarshalling message from input stream", e);
            return Optional.empty();
        }
    }
<p>deserializeSamlObject.</p>

@param obj a {@link String} object
@return a {@link Optional} object
pac4j-saml/src/main/java/org/pac4j/saml/util/Configuration.java