【问题标题】:How to return an XML string after authentication in SimpleSamlPhp如何在 SimpleSamlPhp 中进行身份验证后返回 XML 字符串
【发布时间】:2016-05-16 11:02:33
【问题描述】:

我是 SimpleSamlPhp 的新手,我已经设置了一个工作环境,它能够重定向到一个 URL @ metadata\saml20-sp-remote.php

例子:

$metadata['http://www.example.com'] = array(
    'AssertionConsumerService' => 'http://www.example.com/acceptsaml.php',
    'SingleLogoutService' => 'http://www.example.com/saml2-logout.php',
);

身份验证重定向后,如何将额外的自定义字段(我在 auth_user 表中添加了新的自定义字段,例如:EmployeeID)作为 XML/Json 传递?

谢谢。

【问题讨论】:

    标签: simplesamlphp


    【解决方案1】:

    您可以使用authProc filters 向您的 IdP 声明的 XML 添加新属性。您使用的auth 源还可能具有用于添加/命名属性的其他选项。

    $metadata['myEntityId'] = array(
            'host' => 'my-hostname',
            'privatekey' => 'key.pem',
            'certificate' => 'pub.crt',
            'auth' => 'auth-source',
            'signature.algorithm' => 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256',
            'attributes.NameFormat' => 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
            'authproc' => array(
                50 => array(
                   'class' => 'core:AttributeAdd',
                   'myAttribute' => array('some-value'),
                ),
             ),
    );
    

    【讨论】:

      猜你喜欢
      • 2014-07-07
      • 2021-01-11
      • 1970-01-01
      • 2019-10-29
      • 1970-01-01
      • 2015-04-10
      • 1970-01-01
      • 2020-05-01
      • 1970-01-01
      相关资源
      最近更新 更多