在 itfoxtec 中使用 AssertionConsumerServiceIndex 而不是 assertionConsumerServiceUrl
Using AssertionConsumerServiceIndex instead of assertionConsumerServiceUrl with itfoxtec
是否可以像下面使用 ITfoxtec SAML 2.0 的 SAML 示例那样在 AuthnRequest 中设置 AssertionConsumerServiceIndex
我想要这样的东西:
<?xml version="1.0" encoding="UTF-8"?>
<samlp:AuthnRequest
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
ID="_1330416073" Version="2.0" IssueInstant="2012-02-28T09:01:13Z"
AssertionConsumerServiceIndex="0" ProviderName="provider name">
<saml:Issuer>http://sp.example.com</saml:Issuer>
<samlp:RequestedAuthnContext Comparison="minimum">
<saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef>
</samlp:RequestedAuthnContext>
</samlp:AuthnRequest>
代码:
var binding = new Saml2RedirectBinding();
return binding.Bind(new Saml2AuthnRequest(config)
{
RequestedAuthnContext = new RequestedAuthnContext
{
Comparison = AuthnContextComparisonTypes.Minimum,
AuthnContextClassRef = new string[] { AuthnContextClassTypes.PasswordProtectedTransport.OriginalString },
},
}).ToActionResult();
恐怕 ITfoxtec Identity SAML 2.0 组件不支持 AssertionConsumerServiceIndex
属性。
是否可以像下面使用 ITfoxtec SAML 2.0 的 SAML 示例那样在 AuthnRequest 中设置 AssertionConsumerServiceIndex
我想要这样的东西:
<?xml version="1.0" encoding="UTF-8"?>
<samlp:AuthnRequest
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
ID="_1330416073" Version="2.0" IssueInstant="2012-02-28T09:01:13Z"
AssertionConsumerServiceIndex="0" ProviderName="provider name">
<saml:Issuer>http://sp.example.com</saml:Issuer>
<samlp:RequestedAuthnContext Comparison="minimum">
<saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef>
</samlp:RequestedAuthnContext>
</samlp:AuthnRequest>
代码:
var binding = new Saml2RedirectBinding();
return binding.Bind(new Saml2AuthnRequest(config)
{
RequestedAuthnContext = new RequestedAuthnContext
{
Comparison = AuthnContextComparisonTypes.Minimum,
AuthnContextClassRef = new string[] { AuthnContextClassTypes.PasswordProtectedTransport.OriginalString },
},
}).ToActionResult();
恐怕 ITfoxtec Identity SAML 2.0 组件不支持 AssertionConsumerServiceIndex
属性。