Skip to content

Commit

Permalink
Fix signed assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Oct 8, 2024
1 parent 6ef9db7 commit 6a584dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/IdP/ADFS.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down

0 comments on commit 6a584dd

Please sign in to comment.