@Override
    public Pair<String, String> buildSelfSignedSigningCert(final Optional<SamlRegisteredService> registeredService) throws Throwable {
        val signingCert = getConfigurationContext().getSamlIdPMetadataLocator().resolveSigningCertificate(registeredService);
        val signingKey = getConfigurationContext().getSamlIdPMetadataLocator().resolveSigningKey(registeredService);
        if (signingCert.isFile() && signingKey.isFile()) {
            writeCertificateAndKey(signingCert.getFile(), signingKey.getFile(), registeredService);
        }
        return Pair.of(signingCert.getContentAsString(StandardCharsets.UTF_8), signingKey.getContentAsString(StandardCharsets.UTF_8));
    }
A metadata generator based on a predefined template.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-saml-idp-core/src/main/java/org/apereo/cas/support/saml/idp/metadata/generator/FileSystemSamlIdPMetadataGenerator.java