...
When
...
using
...
Shibboleth,
...
the
...
IdP
...
returns
...
a
...
SAML
...
assertion
...
to
...
the
...
SP.
...
The
...
following
...
examples
...
simply
...
display
...
the
...
results
...
of
...
the
...
SAML
...
assertion.
...
This
...
gives
...
a
...
very
...
brief
...
introduction
...
which
...
shows
...
how
...
your
...
application
...
might
...
consume
...
the
...
information
...
and
...
use
...
it.
PHP
Code Block |
---|
h2. PHP {quote} {quote} {code} <?php <table> foreach($_SERVER as $key => $value) { $fkey = '_' . $key; if (strpos($fkey, 'SHIB') > 0) { echo '<tr>'; echo "<td>$key</td><td>$value</td>"; echo '</tr>'; } } </table> ?> |
Perl
Code Block |
---|
{code} h2. Perl {code} foreach $var (sort(keys(%ENV))) { if ($var =~ m/SHIB/ || $var =~ m/REMOTE_USER/) { $val = $ENV{$var}; $val =~ s|\n|\\n|g; $val =~ s|"|\\"|g; print "<tr>"; print "<td>${var}</td><td>${val}</td>"; print "</tr>"; } } {code} h2. SSI - Server Side Includes [code} <!--#printenv--> {code} or {code} |
SSI - Server Side Includes
Code Block |
---|
<\!\--\#printenv-\->
|
or
Code Block |
---|
<\<!--#echo var="HTTP_SHIB_EP_PERSONPRINCIPALNAME" \--> |
ASP
Code Block |
---|
{code} h2. ASP {code} <table> <% For Each strKey In Request.ServerVariables %> <tr> <td><%= strKey %></td> <td><%= Request.ServerVariables(strKey) %></td> </tr> <% Next %> </table> </table> |
JSP
Code Block |
---|
{code} h2. JSP {code} <u>HEADERS</u><br /> <table> <% java.util.Enumeration eHeaders = request.getHeaderNames(); while(eHeaders.hasMoreElements()) { { String name = (String) eHeaders.nextElement(); Object object = request.getHeader(name); String value = object.toString(); out.println("<tr><td>" + name + "</td><td>" + value + "</td></tr>"); } %> </table> {code} |