@Override
    public MetadataResolver buildMetadataResolver() throws Exception {
        var resolver = createMetadataResolver();
        if (resolver == null) {
            val md = buildEntityDescriptor();
            val entityDescriptorElement = Objects.requireNonNull(this.marshallerFactory.getMarshaller(md)).marshall(md);
            resolver = new DOMMetadataResolver(entityDescriptorElement);
        }
        resolver.setRequireValidMetadata(true);
        resolver.setFailFastInitialization(true);
        resolver.setId(resolver.getClass().getCanonicalName());
        resolver.setParserPool(Configuration.getParserPool());
        resolver.initialize();
        return resolver;
    }
Generates metadata object with standard values and overridden user defined values.

@author Misagh Moayyed
@since 4.0.1
pac4j-saml/src/main/java/org/pac4j/saml/metadata/BaseSAML2MetadataGenerator.java