Renamed targetedId
[java-idp.git] / webApplication / sample.jsp
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html 
3         PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
4         "DTD/xhtml1-strict.dtd">
5         <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
6         <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
7         
8         <jsp:useBean id="logoLocation" scope="application" class="java.lang.String"/>
9         
10 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
11 <head>
12         <link rel="stylesheet" type="text/css" href="main.css" />
13         <title>Shibboleth Protected Page</title>
14 </head>
15
16 <body>
17 <div class="head">
18 <img src="<bean:write name="logoLocation" />" alt="Logo" />
19 <h1>Shibboleth Inter-institutional Access Control System</h1>
20 </div>
21
22 <p>
23 This is an example of a page protected by the Shibboleth system. The
24 Apache server hosting this page contains the following configuration
25 block in its httpd.conf file:
26 <blockquote>
27 <pre>&lt;Location /shibboleth-target/sample.jsp&gt;
28 AuthType shibboleth
29 ShibRequireSession On
30 require valid-user
31 &lt;/Location&gt;</pre>
32 </blockquote>
33 </p>
34
35 <p>Because of the "require valid-user" rule, any user from a trusted
36 origin-site is allowed access, once they establish a session using
37 Shibboleth.</p>
38
39 <p>Here are some pieces of information I can tell about you using
40 the information Shibboleth gives me:<p>
41
42 <p>
43 <ul>
44 <% if (request.getRemoteUser()!=null) { %>
45     <li>Your eduPersonPrincipalName is: <b><%= request.getRemoteUser() %></b></li>
46 <% } %>
47 <% if (request.getHeader("Shib-EP-Affiliation")!=null) { %>
48     <li>Your eduPersonScopedAffiliation value(s):
49     <b><%= request.getHeader("Shib-EP-Affiliation") %></b></li>
50 <% } %>
51 <% if (request.getHeader("Shib-EP-Entitlement")!=null) { %>
52     <li>Your eduPersonEntitlement value(s):
53     <b><%= request.getHeader("Shib-EP-Entitlement") %></b></li>
54 <% } %>
55 <% if (request.getHeader("Shib-TargetedID")!=null) { %>
56     <li>Your PersistentID value(s):
57     <b><%= request.getHeader("Shib-TargetedID") %></b></li>
58 <% } %>
59 </ul>
60 </p>
61
62 </body>
63 </html>