/** * @param \SAML2\Utilities\ArrayCollection $assertions * * @return \SAML2\Assertion[] Collection (\SAML2\Utilities\ArrayCollection) of processed assertions */ public function processAssertions($assertions) { $processed = new ArrayCollection(); foreach ($assertions as $assertion) { $processed->add($this->process($assertion)); } return $processed; }
/** * Add a key to the collection * * @param \SAML2\Certificate\Fingerprint $fingerprint */ public function add($fingerprint) { if (!$fingerprint instanceof Fingerprint) { throw InvalidArgumentException::invalidType('SAML2\\Certificate\\Fingerprint ', $fingerprint); } parent::add($fingerprint); }
/** * Add a key to the collection * * @param \SAML2\Certificate\Key $key */ public function add($key) { if (!$key instanceof Key) { throw InvalidArgumentException::invalidType('SAML2\\Certificate\\Key', $key); } parent::add($key); }
/** * @param \SAML2\Configuration\DecryptionProvider $identityProvider * @param \SAML2\Configuration\DecryptionProvider $serviceProvider * * @return \SAML2\Utilities\ArrayCollection * @throws \Exception */ public function loadDecryptionKeys(DecryptionProvider $identityProvider, DecryptionProvider $serviceProvider) { $decryptionKeys = new ArrayCollection(); $senderSharedKey = $identityProvider->getSharedKey(); if ($senderSharedKey) { $key = new XMLSecurityKey(XMLSecurityKey::AES128_CBC); $key->loadKey($senderSharedKey); $decryptionKeys->add($key); return $decryptionKeys; } $newPrivateKey = $serviceProvider->getPrivateKey(PrivateKey::NAME_NEW); if ($newPrivateKey instanceof PrivateKey) { $loadedKey = $this->loadPrivateKey($newPrivateKey); $decryptionKeys->add($this->convertPrivateKeyToRsaKey($loadedKey)); } $privateKey = $serviceProvider->getPrivateKey(PrivateKey::NAME_DEFAULT, true); $loadedKey = $this->loadPrivateKey($privateKey); $decryptionKeys->add($this->convertPrivateKeyToRsaKey($loadedKey)); return $decryptionKeys; }