0

I'm trying to build a service proviuder (SP) site for a client using a SAML2.0 based user ID system.

I've been able to install simpleSAMLphp on my server and have tested it with an open IdP authentication network - all is working fine if I just create php files which demand authentication against this IdP. Simple adding this to any page makes it work.

require_once('../simplesamlphp/lib/_autoload.php');
$auth = new SimpleSAML_Auth_Simple('default-sp');
$auth->requireAuth();
$attributes = $auth->getAttributes();

Within CMSMS however, if I add the above as a user defined smarty tag (the usual way of including php) I get a "state lost" error. I've tried adding it to the page meta data (via the content interface) as well as simply in the body of the page or at the head of the template.

I always get:

State information lost
State information lost, and no way to restart the request

Does anyone have any ideas what could be going wrong? I've tried the usual fixes for this error messages (adjusting the domain the cookies are assigned to in php.ini etc). No joy.

4

2 回答 2

4

这似乎是 simpleSAMLphp 和 CMSMS 之间的冲突会话管理。

解决此问题的一种简单方法是安装 memcached,并使用 memcache 会话处理程序而不是 simplesamlphp 中的 php 会话处理程序。

于 2012-11-08T06:15:12.127 回答
0

eZ publish (4.x) 和 Symfony2 (2.3+) 也有类似的会话冲突。SQL 会话存储解决了这个问题

于 2012-12-13T12:21:30.943 回答