Skip to content

Commit

Permalink
Add variable to be able to know whether a response was signed, later …
Browse files Browse the repository at this point in the history
…in processing
  • Loading branch information
tvdijen committed Jul 30, 2024
1 parent c5d6dca commit ab8e33a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/SAML2/Entity/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ final class ServiceProvider
protected SignatureAlgorithmFactory $signatureAlgorithmFactory;
protected EncryptionAlgorithmFactory $encryptionAlgorithmFactory;
protected KeyTransportAlgorithmFactory $keyTransportAlgorithmFactory;

protected bool $responseWasSigned;

/**
* @param bool $encryptedAssertions Whether assertions must be encrypted
Expand Down Expand Up @@ -160,7 +160,8 @@ public function receiveResponse(ServerRequestInterface $request): Response
}

// Verify the signature (if any)
$verifiedResponse = $rawResponse->isSigned() ? $this->verifyElementSignature($rawResponse) : $rawResponse;
$this->responseWasSigned = $rawResponse->isSigned();
$verifiedResponse = $this->responseWasSigned ? $this->verifyElementSignature($rawResponse) : $rawResponse;

$state = null;
$stateId = $verifiedResponse->getInResponseTo();
Expand Down

0 comments on commit ab8e33a

Please sign in to comment.