SAML2\Response\Processor::process PHP Method

process() public method

public process ( ServiceProvider $serviceProviderConfiguration, IdentityProvider $identityProviderConfiguration, SAML2\Configuration\Destination $currentDestination, SAML2\Response $response ) : Assertion[]
$serviceProviderConfiguration SAML2\Configuration\ServiceProvider
$identityProviderConfiguration SAML2\Configuration\IdentityProvider
$currentDestination SAML2\Configuration\Destination
$response SAML2\Response
return SAML2\Assertion[] Collection (\SAML2\Utilities\ArrayCollection) of \SAML2\Assertion objects
    public function process(ServiceProvider $serviceProviderConfiguration, IdentityProvider $identityProviderConfiguration, Destination $currentDestination, Response $response)
    {
        $this->preconditionValidator = new PreconditionValidator($currentDestination);
        $this->assertionProcessor = ProcessorBuilder::build($this->logger, $this->signatureValidator, $currentDestination, $identityProviderConfiguration, $serviceProviderConfiguration, $response);
        $this->enforcePreconditions($response);
        $this->verifySignature($response, $identityProviderConfiguration);
        return $this->processAssertions($response);
    }

Usage Example

 /**
  * @expectedException \SAML2\Response\Exception\UnsignedResponseException
  * @runInSeparateProcess
  */
 public function testThatAnUnsignedResponseWithNoSignedAssertionsThrowsAnException()
 {
     // here the processAssertions may not be called as it should fail with an exception due to having no signature
     $this->assertionProcessor->shouldReceive('processAssertions')->never();
     $processor = new Processor(new \Psr\Log\NullLogger());
     $processor->process(new ServiceProvider(array()), new IdentityProvider(array()), new Destination($this->currentDestination), $this->getUnsignedResponseWithUnsignedAssertion());
 }