Ada*_*itt 10 attributes shibboleth
我已成功使用Shibboleth登录我的服务提供商测试页面.然后我转到/Shibboleth.sso/Session页面,我看到以下内容:
Attributes
affiliation: 1 value(s)
entitlement: 1 value(s)
eppn: 1 value(s)
persistent-id: 1 value(s)
unscoped-affiliation: 1 value(s)
Run Code Online (Sandbox Code Playgroud)
我的问题是......如何阅读这些价值观?我在Fiddler的HTTP Request标头中看不到它们.
我的Web应用程序将在ASP.NET MVC 4(C#)中实现.
zer*_*iko 10
您可以使用Request.ServerVariables对象读取IdP发送的Shibboleth SAML属性:
string server = Request.ServerVariables["HTTP_FIRSTNAME"];
Run Code Online (Sandbox Code Playgroud)
见这个,如果你想列出并打印在会话中的所有属性.
请记住配置Shibboleth attribute-map.xml来处理IdP可能发送的自定义属性:
<Attribute name="firstname" id="firstname" nameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
<AttributeDecoder xsi:type="StringAttributeDecoder"/>
</Attribute>
Run Code Online (Sandbox Code Playgroud)
您也showAttributeValues可以true在Session处理程序中设置shibboleth2.xml.请注意,建议不要在生产环境中使用此功能.然后重启shibboleth服务; "会话"页面的"属性"部分将包含实际值.
<!-- Session diagnostic service. -->
<Handler type="Session" Location="/Session" showAttributeValues="true"/>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9658 次 |
| 最近记录: |