| Conditions | 3 |
| Paths | 2 |
| Total Lines | 20 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function isValid(SamlAuthnRequest $authnRequest, AbstractProvider $serviceProvider) |
||
| 24 | { |
||
| 25 | //TODO validate Destination |
||
| 26 | |||
| 27 | // Validate Signature |
||
| 28 | $signingKey = $serviceProvider->signingXMLSecurityKey(); |
||
| 29 | |||
| 30 | if ($signingKey && ($sig = Utils::validateElement($authnRequest->toSignedXML()))) { |
||
| 31 | $authnRequest->addValidator( |
||
| 32 | [ |
||
| 33 | Utils::class, |
||
| 34 | 'validateSignature', |
||
| 35 | ], |
||
| 36 | $sig |
||
| 37 | ); |
||
| 38 | |||
| 39 | $authnRequest->validate($signingKey); |
||
| 40 | } |
||
| 41 | |||
| 42 | return true; |
||
| 43 | } |
||
| 45 |