Hi All ,
I am trying to integrate Saleforce.com with AD FS 2.0.
Both AD FS Idp and Salesforce SP links are working fine.
I need to do few customizations on ADFS login to display client company logo.
For this I want to read the “Audience” value from incoming SAMLRequest.
I have tried with below piece of code:
String mySAMLRequest ="xxxxyyyyzzzz”;
MemoryStream memStream = new MemoryStream(Convert.FromBase64String(mySAMLRequest));
memStream.ReadByte();
memStream.ReadByte();
DeflateStream deflate =newDeflateStream(memStream,CompressionMode.Decompress);
string myDoc =newStreamReader(deflate, System.Text.Encoding.UTF8).ReadToEnd();
but I am getting the below error with my SAMLRequest.
“Unknown block type. Stream might be corrupted."
Can anybody tell me how I can decode this SAMLRequest and read “Audience” attribute value.
<Audience>https://xxx.abc.salesforce.com</Audience>
Or is there any other way to read this "Audience value" from SAMLRequest
My link is as below:
https://xxx.xxx.com/adfs/ls/?SAMLRequest=xxxxxx&Signature=xxxxxx&SigAlg=http%3a%2f%2fwww.w3.org%2f2001%2f04%2fxmldsig-more%23rsa-sha256