public function build($entityID, $acs, $logout, $certificate)
    {
        $entityDescriptor = (new EntityDescriptor())
            ->setEntityID($entityID)
            ->setID(Helper::generateID());

        $spSsoDescriptor = (new SpSsoDescriptor())
            ->addKeyDescriptor(
                (new KeyDescriptor())
                    ->setUse(KeyDescriptor::USE_SIGNING)
                    ->setCertificate($certificate)
            )
            ->addKeyDescriptor(
                (new KeyDescriptor())
                    ->setUse(KeyDescriptor::USE_ENCRYPTION)
                    ->setCertificate($certificate)
            )
            ->setWantAssertionsSigned(true)
            ->setAuthnRequestsSigned(true)
            ->addSingleLogoutService(
                $logout = (new SingleLogoutService())
                    ->setBinding(SamlConstants::BINDING_SAML2_HTTP_REDIRECT)
                    ->setLocation($logout)
            )
            ->addAssertionConsumerService(
                $acs = (new AssertionConsumerService())
                    ->setBinding(SamlConstants::BINDING_SAML2_HTTP_POST)
                    ->setLocation($acs)
            );

        $entityDescriptor->addItem($spSsoDescriptor);

        $serializationContext = new SerializationContext();

        $entityDescriptor->serialize($serializationContext->getDocument(), $serializationContext);

        $data = $serializationContext->getDocument()->saveXML();

        return $data;
    }