From 6a584ddaa1beeedf38e8a6e8433ebd867e309fba Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Tue, 8 Oct 2024 22:23:50 +0200 Subject: [PATCH] Fix signed assertion --- src/IdP/ADFS.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IdP/ADFS.php b/src/IdP/ADFS.php index 3636295..374916f 100644 --- a/src/IdP/ADFS.php +++ b/src/IdP/ADFS.php @@ -449,12 +449,12 @@ public static function sendResponse(array $state): void $algo = $idpMetadata->getOptionalString('signature.algorithm', C::SIG_RSA_SHA256); } $assertion = ADFS::signAssertion($assertion, $privateKeyFile, $certificateFile, $algo, $passphrase); + $assertion = Assertion::fromXML($assertion->toXML()); $requestSecurityToken = new RequestSecurityToken(null, [$assertion]); $appliesTo = new AppliesTo([new EndpointReference(new Address($spEntityId))]); $requestSecurityTokenResponse = new RequestSecurityTokenResponse(null, [$requestSecurityToken, $appliesTo]); - $xmlResponse = $requestSecurityTokenResponse->toXML(); $wresult = $xmlResponse->ownerDocument->saveXML($xmlResponse); $wctx = $state['adfs:wctx'];