Export metadata: PartnerCertificates certificate as string instead of external file

I am upgrading our SAML component from ComponentSpace 3.3.0 to 5.0.0.
I’m seeing a change in behaviour between the two versions:

Old:

"PartnerCertificates": [
  {
    "String": "MIIIkjCCBnqgAwIBAgIPa3GM6fOZb+y43<snip>/HsNahRn84=",
    "Use": "Signature"
  },
  {
    "String": "MIIIlDCCBnygAwIBAgIQBogStymbDkWPBdMvV3cIG6nQ==",
    "Use": "Signature"
  }
],

New

            "PartnerCertificates": [
              {
                "FileName": "Certificates/FF4251EEEA4D65D8C1E6AD5C9121F547352697A0-saml.iamfas.belgium.be.cer",
                "Use": "Signature"
              },
              {
                "FileName": "Certificates/3CF3CF055DA3CA3A20FEA2B26F7F8FFF91C39A0F-saml.iamfas.belgium.be.cer",
                "Use": "Signature"
              }
            ],

Is it possible to return to the previous behaviour: export as inline string instead of external file.

By default we import certificates as files rather than strings.

This can be changed as demonstrated by the following code from the ImportMetadata example project.

using ComponentSpace.Saml2.Metadata.Import;

// By default, certificates are imported as files. 
// To import them as base-64 encoded strings, use the CertificateStringImporter.
serviceCollection.AddTransient<ICertificateImporter, CertificateStringImporter>();

Thx, I was looking in the ExportMetadata project :slight_smile:

You’re welcome.