Definition at line 9 of file AbstractChainedValidator.php.
◆ __construct()
SAML2\Signature\AbstractChainedValidator::__construct |
( |
LoggerInterface |
$logger | ) |
|
◆ validateElementWithKeys()
SAML2\Signature\AbstractChainedValidator::validateElementWithKeys |
( |
SignedElement |
$element, |
|
|
|
$pemCandidates |
|
) |
| |
|
protected |
BC compatible version of the signature check.
- Parameters
-
\SAML2\SignedElement | $element | |
\SAML2\Certificate\X509[] | $pemCandidates | |
- Exceptions
-
Exception
- Returns
- bool
Definition at line 31 of file AbstractChainedValidator.php.
32 {
33 $lastException = null;
34 foreach ($pemCandidates as
$index => $candidateKey) {
36 $key->loadKey($candidateKey->getCertificate());
37
38 try {
39
40
41
44 $this->logger->debug(sprintf(
'Validation with key "#%d" succeeded',
$index));
45 return true;
46 }
47 $this->logger->debug(sprintf(
'Validation with key "#%d" failed without exception.',
$index));
48 } catch (\Exception $e) {
49 $this->logger->debug(sprintf(
50 'Validation with key "#%d" failed with exception: %s',
52 $e->getMessage()
53 ));
54
55 $lastException = $e;
56 }
57 }
58
59 if ($lastException !== null) {
60 throw $lastException;
61 } else {
62 return false;
63 }
64 }
References $index, $key, $result, RobRichards\XMLSecLibs\XMLSecurityKey\RSA_SHA256, and SAML2\SignedElement\validate().
Referenced by SAML2\Signature\PublicKeyValidator\hasValidSignature().
◆ $logger
SAML2\Signature\AbstractChainedValidator::$logger |
|
protected |
The documentation for this class was generated from the following file: