コード例 #1
0
ファイル: Processor.php プロジェクト: SysBind/saml2
 /**
  * @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;
 }
コード例 #2
0
 /**
  * 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);
 }
コード例 #3
0
ファイル: KeyCollection.php プロジェクト: SysBind/saml2
 /**
  * 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);
 }
コード例 #4
0
ファイル: PrivateKeyLoader.php プロジェクト: SysBind/saml2
 /**
  * @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;
 }