diff --git a/LightSAML-Core/Cookbook/How-to-receive-SAML-message/index.md b/LightSAML-Core/Cookbook/How-to-receive-SAML-message/index.md index 8a861ee..a40c8e9 100644 --- a/LightSAML-Core/Cookbook/How-to-receive-SAML-message/index.md +++ b/LightSAML-Core/Cookbook/How-to-receive-SAML-message/index.md @@ -20,8 +20,9 @@ $bindingFactory = new \LightSaml\Binding\BindingFactory(); $binding = $bindingFactory->getBindingByRequest($request); $messageContext = new \LightSaml\Context\Profile\MessageContext(); +$binding->receive($request, $messageContext); /** @var \LightSaml\Model\Protocol\Response $response */ -$response = $binding->receive($request, $messageContext); +$response = $messageContext->getMessage(); print $response->getID(); ```