我实际上使用simpleSamlPhp在我的网站上创建身份验证,因此我在自己的网站上安装了服务提供商,并且还安装了身份提供商,直到他们没有问题为止。我的服务提供商连接到我的身份提供商,并且连接正常。
我在文件“ config / authsources.php”中有另一个用户:
$config = array(
...
'example-userpass' => array(
'userTest:pwd' => array(
'uid' => array('userTest'),
'NameIdentifier' => 'Test',
'Attribut1' => 'att1',
'Attribut2' => 'att2'
)
),
...
),
...
我的问题是我想在一个属性中同时包含多个属性,因为这样的事情:
$config = array(
...
'example-userpass' => array(
'userTest:pwd' => array(
'uid' => array('userTest'),
'NameIdentifier' => 'Test',
'Attribut1' => 'att1',
'Attribut2' => array(
'Attribut21' => 'att21',
'Attribut22' => 'att22',
...
)
)
),
...
),
...
但是当我这样做时,我有此错误:
SimpleSAML_Error_Error: UNHANDLEDEXCEPTION
Backtrace:
1 C:\wamp\www\Idp\simplesamlphp\www\_include.php:37 (SimpleSAML_exception_handler)
0 [builtin] (N/A)
Caused by: Exception: Invalid attributes for user userTest in authentication source example-userpass: Invalid attribute value for attribute Attribut2: array (
'Attribut21' => 'att21',
'Attribut22' => 'att22'
)
那么,如何添加其他属性的属性?
最终我真的没有困难,我只需要做:
$config = array(
...
'example-userpass' => array(
'userTest:pwd' => array(
'uid' => array('userTest'),
'NameIdentifier' => 'Test',
'Attribut1' => 'att1',
'Attribut2' => array(
'att21',
'att22',
...
)
)
),
...
),
...
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句