问题描述
Laravel Version: 5.8
Suite Version: Version 7.10.27
PHP 7.2
Ubuntu 18.04
我正在使用自签名证书:https://www.samltool.com/self_signed_certs.php
我正在尝试在Laravel和Suite之间启用SAML,我已经准备好了所有证书,我的问题是我在Laravel中遇到此错误:
ErrorException (E_WARNING)
DOMDocument::createElementNS(): unterminated entity reference module=Users
##/vendor/lightsaml/lightsaml/src/LightSaml/Model/AbstractSamlModel.PHP
*/
protected function manyElementsToXml($value,\DOMNode $node,SerializationContext $context,$nodeName = null,$namespaceUri = null)
{
if (false == $value) {
return;
}
if (false == is_array($value)) {
throw new \LogicException('value must be array or null');
}
foreach ($value as $object) {
if ($object instanceof SamlElementInterface) {
if ($nodeName) {
throw new \LogicException('nodeName should not be specified when serializing array of SamlElementInterface');
}
$object->serialize($node,$context);
} elseif ($nodeName) {
if ($namespaceUri) {
$child = $context->getDocument()->createElementNS($namespaceUri,$nodeName,(string) $object);
} else {
$child = $context->getDocument()->createElement($nodeName,(string) $object);
}
$node->appendChild($child);
} else {
throw new \LogicException('Can handle only array of AbstractSamlModel or strings with nodeName parameter specified');
}
}
}
<?PHP
return [
'sp' => [
'issuer' => env('APP_URL'),// add your cert.pem and key.pem to /storage/saml
'cert' => 'saml','key' => 'saml','suite.com' => [
'destination' => 'https://suite.com/index.PHP?action=Login&module=Users','type' => 'crm',],]
];
如果我删除了这一部分&module=Users
,该错误消失了,但最终我得到了无限重定向,因为我猜Suite在没有&module=Users
的情况下无法正确地重定向它。
所以我的问题是我在做什么错,Suite是否为SAML身份验证使用了不同的登录URL?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)