<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span>If you want you can just make a simple page to dump the headers and see what you get.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span><pre style="padding: 5px; margin-top: 0px; margin-bottom: 0px; font-family: Consolas, Courier, monospace; overflow: auto; word-wrap: normal; font-size: 13px; line-height: 17px;">                                Console.WriteLine(<span style="color: rgb(163, 21, 21);">"\r\nThe following headers were received in the response:"</span>);
                                <span style="color: green;">// Displays each header and it's key associated with the response. </span>
                                <span style="color: blue;">for</span>(<span style="color: blue;">int</span> i=0; i < myHttpWebResponse.Headers.Count; ++i)
                                        Console.WriteLine(<span style="color: rgb(163, 21, 21);">"\nHeader Name:{0}, Value :{1}"</span>,myHttpWebResponse.Headers.Keys[i],myHttpWebResponse.Headers[i]);
                                <span style="color: green;">// Releases the resources of the response.</span>
                                myHttpWebResponse.Close(); </pre><pre style="padding: 5px; margin-top: 0px; margin-bottom: 0px; font-family: Consolas, Courier, monospace; overflow: auto; word-wrap: normal; font-size: 13px; line-height: 17px;">That's for console but you can dump it to a page.</pre></span></div><div><br></div> <div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1"> <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Nate Klingenstein <ndk@internet2.edu><br> <b><span style="font-weight: bold;">To:</span></b> Shib Users <users@shibboleth.net> <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, May 31, 2013 10:46 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: Capturing SAML Attributes from the IDP<br> </font> </div> <div class="y_msg_container"><br><div
id="yiv3327027134">
<div>
In addition to Mike's response, this wiki article may prove helpful:
<div><br>
</div>
<div><a rel="nofollow" target="_blank" href="https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPAttributeAccess">https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPAttributeAccess</a><br>
<div><br>
</div>
<div>If you absolutely need to inspect the assertion, you can do it by calling this:</div>
<div><br>
</div>
<div>https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPAssertionExport</div>
<div><br>
<div>
<div>On May 31, 2013, at 17:39 , Mike Flynn wrote:</div>
<br class="yiv3327027134Apple-interchange-newline">
<blockquote type="cite">
<div>
<div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 12pt;">
<div><span><font size="3">Your page at the protected resource can interrogate the response headers for the </font>attributes<font size="3"> and some other Shib parameters. Are you looking to get the actual assertion itself to examine it? If so you can turn
on debugging in the logger config files and get the assertions in the logs.</font></span></div>
<div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><br>
</div>
<div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;">
<div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">
<div dir="ltr">
<hr size="1">
<font size="2" face="Arial"><b><span style="font-weight:bold;">From:</span></b> Jim Hoy <jim.hoy@acatar.com><br>
<b><span style="font-weight:bold;">To:</span></b> "users@shibboleth.net" <users@shibboleth.net>
<br>
<b><span style="font-weight:bold;">Sent:</span></b> Friday, May 31, 2013 10:21 AM<br>
<b><span style="font-weight:bold;">Subject:</span></b> Capturing SAML Attributes from the IDP<br>
</font></div>
<div class="yiv3327027134y_msg_container"><br>
<div id="yiv3327027134"><style><!--
#yiv3327027134
filtered {font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;}
#yiv3327027134 filtered {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
#yiv3327027134
p.yiv3327027134MsoNormal, #yiv3327027134 li.yiv3327027134MsoNormal, #yiv3327027134 div.yiv3327027134MsoNormal
        {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", "sans-serif";}
#yiv3327027134 a:link, #yiv3327027134 span.yiv3327027134MsoHyperlink
        {color:#0563C1;text-decoration:underline;}
#yiv3327027134 a:visited, #yiv3327027134 span.yiv3327027134MsoHyperlinkFollowed
        {color:#954F72;text-decoration:underline;}
#yiv3327027134 p.yiv3327027134MsoListParagraph, #yiv3327027134 li.yiv3327027134MsoListParagraph, #yiv3327027134 div.yiv3327027134MsoListParagraph
        {margin-top:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", "sans-serif";}
#yiv3327027134 span.yiv3327027134EmailStyle17
        {font-family:"Calibri", "sans-serif";color:windowtext;}
#yiv3327027134 .yiv3327027134MsoChpDefault
        {font-family:"Calibri", "sans-serif";}
#yiv3327027134 filtered {margin:1.0in 1.0in 1.0in 1.0in;}
#yiv3327027134 div.yiv3327027134WordSection1
        {}
#yiv3327027134
filtered {}
#yiv3327027134 filtered {}
#yiv3327027134 filtered {}
#yiv3327027134 filtered {}
#yiv3327027134 filtered {}
#yiv3327027134 filtered {}
#yiv3327027134 filtered {}
#yiv3327027134 filtered {}
#yiv3327027134 filtered {}
#yiv3327027134 filtered {}
#yiv3327027134 ol
        {margin-bottom:0in;}
#yiv3327027134 ul
        {margin-bottom:0in;}
--></style>
<div>
<div class="yiv3327027134WordSection1">
<div class="yiv3327027134MsoNormal">I suppose this is a lifecycle issue, and please excuse the question if it’s stupid one, but… As I see it, the process goes like this:</div>
<div class="yiv3327027134MsoNormal"> </div>
<div class="yiv3327027134MsoListParagraph" style=""><span style="">1.<span style="font:7.0pt;">
</span></span>User requests a Shib-protected resource. <br>
<br>
</div>
<div class="yiv3327027134MsoListParagraph" style=""><span style="">2.<span style="font:7.0pt;">
</span></span>The Shibboleth ISAPI filter (as this is Windows/IIS) intercepts the request and directs the user to the IDP (only one IDP here)<br>
<br>
</div>
<div class="yiv3327027134MsoListParagraph" style=""><span style="">3.<span style="font:7.0pt;">
</span></span>The user logs in successfully<br>
<br>
</div>
<div class="yiv3327027134MsoListParagraph" style=""><span style="">4.<span style="font:7.0pt;">
</span></span>The browser is redirected (HTTP 302) back to /Shibboleth.sso/SAML2/POST<br>
<br>
</div>
<div class="yiv3327027134MsoListParagraph" style=""><span style="">5.<span style="font:7.0pt;">
</span></span>The ISAPI filter does another 302 redirection to my secured content (/secure), which is now available to the authenticated user.</div>
<div class="yiv3327027134MsoNormal"> </div>
<div class="yiv3327027134MsoNormal">At step #4, I look at the HTTP request and see that there are form variables posted to the HTTP-POST handler (Shibboleth.sso/SAML2/POST). The form variables includes one called SAMLResponse which is the base 64-encoded SAML
XML. This information is apparently discarded when the 302 redirect happens from the HTTP-POST handler to the /secure URL.</div>
<div class="yiv3327027134MsoNormal"> </div>
<div class="yiv3327027134MsoNormal">My question is a simple one: How do I access the SAMLResponse in this process? I need to extract the list of attributes for use elsewhere in my application, and I’m green-horned enough to not understand what I do at this
point to actually get to the attributes I’ve just received.</div>
<div class="yiv3327027134MsoNormal"> </div>
<div class="yiv3327027134MsoNormal">Thanks for your help (and for not laughing too hard)</div>
<div class="yiv3327027134MsoNormal"> </div>
<div class="yiv3327027134MsoNormal"> </div>
</div>
</div>
</div>
<br>
--<br>
To unsubscribe from this list send an email to <a rel="nofollow" ymailto="mailto:users-unsubscribe@shibboleth.net" target="_blank" href="mailto:users-unsubscribe@shibboleth.net">
users-unsubscribe@shibboleth.net</a><br>
<br>
</div>
</div>
</div>
</div>
</div>
--<br>
To unsubscribe from this list send an email to users-unsubscribe@shibboleth.net</blockquote>
</div>
<br>
</div>
</div>
</div>
</div><br>--<br>To unsubscribe from this list send an email to <a ymailto="mailto:users-unsubscribe@shibboleth.net" href="mailto:users-unsubscribe@shibboleth.net">users-unsubscribe@shibboleth.net</a><br><br></div> </div> </div> </div></body></html>