【发布时间】:2021-08-18 09:50:25
【问题描述】:
如何在 C# 中使用 itfoxtec-identity-saml2 将此示例添加到断言中?找不到合适的方法...
<saml:AttributeStatement>
<saml:Attribute FriendlyName="SurName" Name="urn:oid:2.5.4.4" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
<saml:AttributeValue xsi:type="xs:string">Max</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute FriendlyName="CommonName" Name="urn:oid:2.5.4.3" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
<saml:AttributeValue xsi:type="xs:string">Max Mustermann</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute Name="urn:oid:0.9.2342.19200300.100.1.1" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
<saml:AttributeValue xsi:type="xs:string">has</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute FriendlyName="Email" Name="urn:oid:0.9.2342.19200300.100.1.3" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
<saml:AttributeValue xsi:type="xs:string">max@mustermann.de</saml:AttributeValue>
</saml:Attribute> </saml:AttributeStatement>
【问题讨论】:
-
您想在 AuthnRequest 中添加 AttributeStatement 还是在 AuthnResponse 中发出的 Assertion 中添加?
-
据我了解,这将与 AuthNRequest 一起发送并在 AuthNResponse 中发出的断言中返回
-
AuthnResponse 中 Assertion 中的 AttributeStatements 由 IdP 发出。作为 RP,您只能提供意向声明。
-
但在 itfoxtec-identity-saml2 的测试应用程序中,TestIdPCore 项目充当 IdP。如何配置它以传递这些属性?
-
你的意思是我应该用这个属性扩展依赖方?