与长urn:oasis键名称相比,如何将属性键重命名为其可读版本?

时间:2019-11-18 20:14:36

标签: saml simplesamlphp

我正在使用什么。

我正在使用SimpleSAMLphp来建立与IDP进行身份验证的服务提供商。我在自己的计算机上同时设置了SP和IDP进行测试。我有使用'exampleauth:UserPass'的IDP,每个用户具有一些属性。这是基本的示例教程代码。

'student:studentpass' => [
        'uid' => ['student'],
        'eduPersonAffiliation' => ['member', 'student'],
    ],

    'employee:employeepass' => [
        'uid' => ['employee'],
        'eduPersonAffiliation' => ['member', 'employee'],
    ],

然后我有一个PHP页面,该页面使用API​​来确保您已通过身份验证,将您重定向到IDP登录页面。登录后,您将返回到我的页面,我只显示属性的php数组。它们的返回方式如下:

Array
(
    [urn:oid:0.9.2342.19200300.100.1.1] => Array
    (
        [0] => 123
    )

    [urn:oid:1.3.6.1.4.1.5923.1.1.1.1] => Array
    (
        [0] => member
        [1] => employee
        [2] => tech
    )

)

我的主要问题是,如何使密钥与最初的密钥相同? 我仍然了解整个协议。 我相信属性键是标准的,并且在遵循该协议的所有SAML用户中应该相同吗? 我一直在阅读文档,但有点困惑,看着authsoruces.php和'attributes'键,'attributes.NameFormat'等。

0 个答案:

没有答案