| Total Complexity | 2 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class EncryptedAssertion extends AbstractSamlElement implements EncryptedElementInterface |
||
| 19 | { |
||
| 20 | use EncryptedElementTrait; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var bool |
||
| 24 | */ |
||
| 25 | protected $wasSignedAtConstruction = false; |
||
| 26 | |||
| 27 | |||
| 28 | /** |
||
| 29 | * @inheritDoc |
||
| 30 | * |
||
| 31 | * @return \SAML2\XML\saml\Assertion |
||
| 32 | * @throws \Exception |
||
| 33 | * |
||
| 34 | * @psalm-suppress MismatchingDocblockReturnType |
||
| 35 | * @psalm-suppress ImplementedReturnTypeMismatch |
||
| 36 | */ |
||
| 37 | public function decrypt(XMLSecurityKey $key, array $blacklist = []): AbstractXMLElement |
||
| 38 | { |
||
| 39 | $assertionXML = Utils::decryptElement($this->encryptedData->toXML(), $key, $blacklist); |
||
| 40 | |||
| 41 | Utils::getContainer()->debugMessage($assertionXML, 'decrypt'); |
||
| 42 | |||
| 43 | return new Assertion($assertionXML); |
||
| 44 | } |
||
| 45 | |||
| 46 | |||
| 47 | /** |
||
| 48 | * @return bool |
||
| 49 | */ |
||
| 50 | public function wasSignedAtConstruction(): bool |
||
| 53 | } |
||
| 54 | } |
||
| 55 |