<div dir="ltr"><div>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><br></div><div>To encode:</div><div><br></div><div>1. Convert XML to byte stream</div><div>2. Compress the byte stream</div><div>3. Base64 encode the compressed stream</div><div>4. UrlEncode the Base64 string </div>
<div>
<br></div><div>To decode:</div><div><br></div><div>1. UrlDecode the string</div><div>2. Base64 Decode the UrlDecoded string</div><div>3. Decompress the Base64</div><div>4. Convert the byte stream to XML</div><div><br></div>

<div>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>