<div dir="ltr"><div style="font-family:arial,sans-serif;font-size:13px">I’m trying to programmatically encode and decode AuthnRequest XML. Which technologies are used and what steps would I follow to do this? If I understand correctly, the typical process goes like this:</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">To encode:</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
1. Convert XML to byte stream</div><div style="font-family:arial,sans-serif;font-size:13px">2. Compress the byte stream</div><div style="font-family:arial,sans-serif;font-size:13px">3. Base64 encode the compressed stream</div>
<div style="font-family:arial,sans-serif;font-size:13px">4. UrlEncode the Base64 string </div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">To decode:</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">1. UrlDecode the string</div><div style="font-family:arial,sans-serif;font-size:13px">2. Base64 Decode the UrlDecoded string</div>
<div style="font-family:arial,sans-serif;font-size:13px">3. Decompress the Base64</div><div style="font-family:arial,sans-serif;font-size:13px">4. Convert the byte stream to XML</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">When I try to decode the AuthnRequest that we are passing to an IDP, I don’t get anything usable. I’ve tried GZip and .Net’s DeflateStream. Do I have the encoding and decoding process corrent? What compression does shib use? Is the XML signed with a cert?</div>
</div>