Skip to content

Commit 3831b3b

Browse files
committed
Add variable to be able to know whether a response was signed, later in processing
1 parent 7f09bf4 commit 3831b3b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/SAML2/Entity/ServiceProvider.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ final class ServiceProvider
5454
protected SignatureAlgorithmFactory $signatureAlgorithmFactory;
5555
protected EncryptionAlgorithmFactory $encryptionAlgorithmFactory;
5656
protected KeyTransportAlgorithmFactory $keyTransportAlgorithmFactory;
57-
57+
protected bool $responseWasSigned;
5858

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

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

165166
$state = null;
166167
$stateId = $verifiedResponse->getInResponseTo();

0 commit comments

Comments
 (0)