@Operation(summary = "Get IdP encryption certificate",
        parameters = @Parameter(name = "service", in = ParameterIn.QUERY, required = false, description = "Service identifier"))
    @GetMapping(path = SamlIdPConstants.ENDPOINT_IDP_METADATA + "/encryptionCertificate", produces = MediaType.TEXT_PLAIN_VALUE)
    public String idpEncryptionCertificate(
        @RequestParam(value = "service", required = false) final String service) throws Throwable {
        val registeredService = getRegisteredServiceIfAny(service);
        metadataAndCertificatesGenerationService.generate(registeredService);
        try (val md = samlIdPMetadataLocator.resolveEncryptionCertificate(registeredService).getInputStream()) {
            return IOUtils.toString(md, StandardCharsets.UTF_8);
        }
    }
Idp encryption certificate.

@param service  the service
@throws Throwable the throwable
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/metadata/SamlIdPMetadataController.java