src/UserAdmin.php
protected function fetchCertificate()
    {
        $metadata = file_get_contents($this->getBaseUrl() . $this->getAdminSpMetadataFile());
        $deserializationContext = new DeserializationContext();
        $deserializationContext->getDocument()->loadXML($metadata);

        $ed = new EntityDescriptor();

        $ed->deserialize($deserializationContext->getDocument(), $deserializationContext);

        $certificate = $ed->getFirstSpSsoDescriptor()->getFirstKeyDescriptor(KeyDescriptor::USE_ENCRYPTION)
            ? $ed->getFirstSpSsoDescriptor()->getFirstKeyDescriptor(KeyDescriptor::USE_ENCRYPTION)
                ->getCertificate()
                ->toPem()
            : $ed->getFirstSpSsoDescriptor()->getFirstKeyDescriptor(KeyDescriptor::USE_SIGNING)
                ->getCertificate()
                ->toPem();

        return $certificate;
    }
protected function fetchCertificate()
    {
        $metadata = file_get_contents($this->getBaseUrl() . $this->getAdminSpMetadataFile());
        $deserializationContext = new DeserializationContext();
        $deserializationContext->getDocument()->loadXML($metadata);

        $ed = new EntityDescriptor();

        $ed->deserialize($deserializationContext->getDocument(), $deserializationContext);

        $certificate = $ed->getFirstSpSsoDescriptor()->getFirstKeyDescriptor(KeyDescriptor::USE_ENCRYPTION)
            ? $ed->getFirstSpSsoDescriptor()->getFirstKeyDescriptor(KeyDescriptor::USE_ENCRYPTION)
                ->getCertificate()
                ->toPem()
            : $ed->getFirstSpSsoDescriptor()->getFirstKeyDescriptor(KeyDescriptor::USE_SIGNING)
                ->getCertificate()
                ->toPem();

        return $certificate;
    }
protected function fetchCertificate ( ) { $ metadata = file_get_contents ( $ this -> getBaseUrl ( ) . $ this -> getAdminSpMetadataFile ( ) ) ; $ deserializationContext = new DeserializationContext ( ) ; $ deserializationContext -> getDocument ( ) -> loadXML ( $ metadata ) ; $ ed = new EntityDescriptor ( ) ; $ ed -> deserialize ( $ deserializationContext -> getDocument ( ) , $ deserializationContext ) ; $ certificate = $ ed -> getFirstSpSsoDescriptor ( ) -> getFirstKeyDescriptor ( KeyDescriptor :: USE_ENCRYPTION ) ? $ ed -> getFirstSpSsoDescriptor ( ) -> getFirstKeyDescriptor ( KeyDescriptor :: USE_ENCRYPTION ) -> getCertificate ( ) -> toPem ( ) : $ ed -> getFirstSpSsoDescriptor ( ) -> getFirstKeyDescriptor ( KeyDescriptor :: USE_SIGNING ) -> getCertificate ( ) -> toPem ( ) ; return $ certificate ; }
Fetch Connect Admin SP metadata an return encryption certificate

@return string
Fetch Connect Admin SP metadata an return encryption certificate