I've created sample solution that post encrypted SAML file to IDP using Component Space library. The request posted successfully. However, I didn't get expected response. I communicated with the IDP who told me that The request should come across the following steps.
- Deflate & Base64 encode
- URL encode
Below are my saml.config and method that i used to send the file with test value "10" for relay state.
My question is:
Is their any way to configure saml.config file to apply requests from IDP? If no is their any workaround that i can follow?
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>
Method:
private void TestComponentSpaceSaml()
{
var ConsumerServiceName = "Tawtheeq Online";
SAMLServiceProvider.InitiateSSO(Response, "10", ConsumerServiceName);
}