summaryrefslogtreecommitdiff
path: root/src/main/webapp/wayf-swamid.jsp
blob: 9a7b989368a5c90dd4c050b4ab42ecb1c33e87b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page contentType="text/html;charset=UTF-8" %> 
<html>

<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>

<%request.setCharacterEncoding("UTF-8");%>
<%response.setCharacterEncoding("UTF-8");%>

<logic:present name="showComments" scope="Request">

<!-- TO CONFIGURE THIS FOR A SPECIFIC SITE
     =====================================

     Before you deploy this jsp you need to look for CONFIG below.
     These mark places where you should make changes. 

     If you want to make more profound changes but only to the jsp,
     you should read the sections marked PROGRAMMING NOTE below.-->

<!-- PROGRAMMING NOTE

     "requestURL" contains the URL that was specified to get the
     WAYF going.  The jsp uses it mostly for submitting result back to
     the WAYF and error reporting -->

</logic:present>

    <jsp:useBean id="requestURL" scope="request" class="java.lang.String"/>

<logic:notPresent name="entityID" scope="request">
<logic:notPresent name="shire" scope="request">

<jsp:forward page = "wayferror-swamid.jsp"/>
</logic:notPresent>
</logic:notPresent>


<head>
    <title>Identity Provider Selection</title>
    <link rel="stylesheet" title="normal" type="text/css" href="wayf-swamid.css"/>
</head>

<body>
  <div id="container">
    <div class="head">
       <img src="images/swami2.png" alt="SWAMI logotype"/>
    </div>

    <div class="content">
     <h1>Authentication required</h1>
     <div class="selector">
      <div class="selector-left">
        <h2>Select your identity provider from the list</h2>

        <logic:present name="sites" scope="request"><logic:notPresent name="siteLists" scope="request">
            <form id="originform" method="get" action="<bean:write name="requestURL" />">
                <logic:notPresent name="entityID" scope="request">
                    <input type="hidden" name="shire" value="<bean:write name="shire" />" />
                    <input type="hidden" name="target" value="<bean:write name="target" />" />
                    <input type="hidden" name="providerId" value="<bean:write name="providerId" />" />
                    <logic:present name="time" scope="request">
                         <input type="hidden" name="time" value="<bean:write name="time" />" />
                    </logic:present>
                </logic:notPresent>
                <logic:present name="entityID" scope="request">
                    <input type="hidden" name="entityID" value="<bean:write name="entityID" />" />
                    <input type="hidden" name="returnX" value="<bean:write name="returnX" />" />
                    <input type="hidden" name="returnIDParam" value="<bean:write name="returnIDParam" />" />
                 </logic:present>
                 <input type="hidden" name="action" value="selection" />
                 <!-- input type="text" id="originSearch" name="string" value="" tabindex="25" size="30"/ -->
                 <select name="origin" id="origin" tabindex="40">      
                     <logic:iterate id="site" name="sites">
                         <option value="<jsp:getProperty name="site" property="name" />">
                             <jsp:getProperty name="site" property="displayName" />
                         </option>
                     </logic:iterate>
                 </select>
                 <input type="submit" value="Select" tabindex="50" />
                 <select name="cache" tabindex="60">
                     <option value="false"> Do not remember</option>
                     <option value="session" selected="selected"> Remember for session</option>
                     <option value="perm"> Remember for a week</option>
                 </select>
            </form>
        </logic:notPresent></logic:present>
       </div>
       <div class="selector-right">
        <logic:present name="cookieList" scope="request">
        <h2>Recently used</h2>
        <ul>
        <logic:iterate id="site" name="cookieList">
            <li>
              <logic:present name="entityID" scope="request">

                <bean:define id="returnIDParam" name="returnIDParam"/>
                <bean:define id="ei" name="entityID" />
                <bean:define id="re" name="returnX"/>

                <a href="<bean:write name="requestURL" />?entityID=<%= java.net.URLEncoder.encode(ei.toString(), "utf-8") %>&amp;return=<%= java.net.URLEncoder.encode(re.toString(), "utf-8") %>&amp;returnIDxParam=<%= java.net.URLEncoder.encode( returnIDParam.toString(), "utf-8" ) %>&amp;cache=perm&amp;action=selection&amp;origin=<jsp:getProperty name="site" property="name" />">
                    <jsp:getProperty name="site" property="displayName" />
                </a>
              </logic:present>
              <logic:notPresent name="entityID" scope="request">
                <bean:define id="targ" name="target" />
                <bean:define id="shire" name="shire" />
                <bean:define id="pid" name="providerId" />
                <a href="<bean:write name="requestURL" />?target=<%= java.net.URLEncoder.encode(targ.toString(),"utf-8") %>&amp;shire=<%= java.net.URLEncoder.encode(shire.toString(),"utf-8") %>&amp;providerId=<%= java.net.URLEncoder.encode(pid.toString(),"utf-8") %>&amp;time=<bean:write name="time" />&amp;cache=perm&amp;action=selection&amp;origin=<jsp:getProperty name="site" property="name" />">
                    <jsp:getProperty name="site" property="displayName" />
                </a>
              </logic:notPresent>
            </li>
        </logic:iterate>
        </ul>

        <form method="get" action="ClearCache.wayf">
          <logic:notPresent name="entityID" scope="request">
            <input type="hidden" name="shire" value="<bean:write name="shire" />" />
            <input type="hidden" name="target" value="<bean:write name="target" />" />
            <input type="hidden" name="providerId" value="<bean:write name="providerId" />" />
            <logic:present name="time" scope="request">
            <input type="hidden" name="time" value="<bean:write name="time" />" />
          </logic:present>
          </logic:notPresent>
          <logic:present name="entityID" scope="request">
            <input type="hidden" name="entityID" value="<bean:write name="entityID" />" />
            <input type="hidden" name="returnX" value="<bean:write name="returnX" />" />
            <input type="hidden" name="returnIDParam" value="<bean:write name="returnIDParam" />" />
          </logic:present>
          <input tabindex="20" type="submit" value="Clear List" />
        </form>
        </logic:present>
       </div>
       <div style="clear: both;"></div>
     </div>

     <div class="content-left">
        <img src="images/swedish-flag.png" alt="Swedish flag"/>
        <h2>Välj en identitetsutgivare</h2>
        <p>Tjänsten du försöker nå kräver att du väljer en identitetsutgivare (tex ditt universitet/högskola) från ovanstående lista innan du kan logga in. </p>
        <p><a title="Länken öppnas i ett nytt fönster" href="http://www.swamid.se/pub/jsp/polopoly.jsp?d=6940&amp;a=25649" class="external-link" rel="external">Vad är en identitetsutgivare?</a><br/>
           <a title="Länken öppnas i ett nytt fönster" href="http://www.swamid.se/pub/jsp/polopoly.jsp?d=6940" class="external-link" rel="external">Vad är SWAMID?</a></p>
     </div>
     <div class="content-right">
        <img src="images/flagga_uk.gif" alt="English flag"/>
        <h2>Choose an identity provider</h2>
        <p>The Service you are trying to access requires you to choose an identityprovider (e.g. your university/college) from the list above before you can log in. </p>
        <p><a title="Link will open in a new window" href="http://www.swamid.se/pub/jsp/polopoly.jsp?d=6940&amp;a=25650" target="wayf-info" class="external-link" rel="external">What is an identity provider?</a><br/>
           <a title="Link will open in a new window" href="http://www.swamid.se/pub/jsp/polopoly.jsp?d=6940" class="external-link" target="wayf-info" rel="external">What is SWAMID?</a>
        </p>
     </div>
    </div>

    <div class="footer">
        <p class="text">
The <a href="http://www.swamid.se">SWAMID federation</a> is an activity of the <a href="http://www.swami.se">Swedish Alliance for Middleware Infrastructure</a>.
<a href="http://www.swamid.se">SWAMID</a> is in part based on <a href="http://shibboleth.internet2.edu">Shibboleth</a> from <a href="http://www.internet2.edu">Internet2</a>.
If you need assistance or require information send an e-mail to <a href="mailto:info@swamid.se?subject=WAYF+support+request">SWAMID support</a> with a description of the problem.
        </p>
    </div>
</div>
</body>
</html>