使用 LightSAML 接收 SAML 消息

我尝试使用 LightSAML 成功接收 AuthnRequest 后的响应,并尝试使用官方文档https://www.lightsaml.com/LightSAML-Core/Cookbook/How-to-receive-SAML-message/中的示例来执行此操作,但我的响应为空,并在 $response 属性的分配中收到警告:

使用“void”方法“接收”结果

出了什么问题以及为什么我无法接受我的回复?


冉冉说
浏览 95回答 1
1回答

DIEA

经过一些搜索和此问题https://github.com/lightSAML/lightSAML/issues/95的帮助后,我设法使用以下代码获取用户的响应和属性:$request = \Symfony\Component\HttpFoundation\Request::createFromGlobals();$bindingFactory = new BindingFactory();$messageContext = new MessageContext();$binding = $bindingFactory->getBindingByRequest($request);$binding->receive($request, $messageContext);$attributes = $messageContext->asResponse()->getFirstAssertion()->getFirstAttributeStatement();我与您分享希望对某人有所帮助。
打开App,查看更多内容
随时随地看视频慕课网APP