我创建了使用组件空间库将加密的 SAML 文件发布到 IDP 的示例解决方案。请求发布成功。然而,我没有得到预期的回应。我与 IDP 进行了沟通,他们告诉我该请求应经过以下步骤。
- Deflate & Base64 编码
- 网址编码
下面是我的 saml.config 和我用来发送具有测试值“10”的文件以用于中继状态的方法。
我的问题是:
他们有什么方法可以配置 saml.config 文件以应用来自 IDP 的请求?如果没有,我可以遵循他们的任何解决方法吗?
SAML.config
<SAMLConfiguration xmlns="urn:componentspace:SAML:2.0:configuration">
<ServiceProvider Name="http://localhost:45661/"
LocalCertificateFile="localCertificatePath.p12"/>
<PartnerIdentityProviders>
<PartnerIdentityProvider Name="Tawtheeq Online"
SignAuthnRequest="true"
SignatureMethod="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
SingleSignOnServiceBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
SingleSignOnServiceUrl="Destination URL"
PartnerCertificateFile="IDPcertificateURL.cer"/>
</PartnerIdentityProviders>
</SAMLConfiguration>
方法:
private void TestComponentSpaceSaml()
{
var ConsumerServiceName = "Tawtheeq Online";
SAMLServiceProvider.InitiateSSO(Response, "10", ConsumerServiceName);
}