Example #1
0
 public function validate(SAML2_Response $response, SAML2_Response_Validation_Result $result)
 {
     $destination = $response->getDestination();
     if (!$this->expectedDestination->equals(new SAML2_Configuration_Destination($destination))) {
         $result->addError(sprintf('Destination in response "%s" does not match the expected destination "%s"', $destination, $this->expectedDestination));
     }
 }
 public function validate(SAML2_XML_saml_SubjectConfirmation $subjectConfirmation, SAML2_Assertion_Validation_Result $result)
 {
     $recipient = $subjectConfirmation->SubjectConfirmationData->Recipient;
     if ($recipient && !$this->destination->equals(new SAML2_Configuration_Destination($recipient))) {
         $result->addError(sprintf('Recipient in SubjectConfirmationData ("%s") does not match the current destination ("%s")', $recipient, $this->destination));
     }
 }
Example #3
0
 /**
  * @group configuration
  * @test
  */
 public function two_destinations_with_the_different_values_are_not_equal()
 {
     $destinationOne = new SAML2_Configuration_Destination('a');
     $destinationTwo = new SAML2_Configuration_Destination('a');
     $this->assertTrue($destinationOne->equals($destinationTwo));
 }