- when clean:
    - xslt:
       stylesheet: tidy.xsl
    - check_xml_namespaces
    - break
- when update:
    - load:
        - /opt/metadata/fidus-interfederations-test cleanup clean
        - /opt/metadata/test-idp cleanup clean
        - /opt/metadata/test-sp cleanup clean
        - /opt/metadata/production-idp cleanup clean
        - /opt/metadata/production-sp cleanup clean
    - select
    - fork:
        - select as downstream:
           - https://fidustest.skolverket.se/shibboleth
           - https://idpproxy.dev.eduid.se/sp
           - https://vfu-test.su.se/Shibboleth.sso
           - https://vfusyd-test.su.se/Shibboleth.sso
           - https://betyg.test.uhr.se/beda-inrapportering
           - https://betyg.uhr.se/beda-inrapportering
           - https://teknikattan-idpproxy.sunet.se/sp
        - break
    - fork:
        - select as ds
        - break
    - break
- when request:
    - select
    - pipe:
        - when accept application/xml:
             - xslt:
                 stylesheet: tidy.xsl
             - pubinfo:
                 publisher: https://md.fidus.skolverket.se/test/
             - first
             - finalize:
                 baseURL: https://md.fidus.skolverket.se/test/
                 cacheDuration: PT5H
                 validUntil: P10D
             - sign:
                 key: /etc/credentials/pyff-signing-key.pem
                 cert: /etc/credentials/metadata.crt
             - emit application/xml
             - break
        - when accept application/json:
             - discojson
             - emit application/json:
             - break
