SIDP-475 Better login page for IdP
authorrdw <rdw@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 29 Mar 2011 08:39:10 +0000 (08:39 +0000)
committerrdw <rdw@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 29 Mar 2011 08:39:10 +0000 (08:39 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/branches/REL_2@3004 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

doc/RELEASE-NOTES.txt
src/main/webapp/error.jsp
src/main/webapp/login.css [new file with mode: 0644]
src/main/webapp/login.jsp

index fc5b39c..86378a5 100644 (file)
@@ -13,6 +13,7 @@ Changes in Release 2.3.0
 [SIDP-471] - Taglibs appear to be caching SP information
 [SIDP-401] - Quick installer no longer does special things to the Tomcat installation for the "administrator" login
 [SIDP-474] - NPE in taglib processing (bug never released).
+[SIDP-475] - Better login page for IdP
 
 Changes in Release 2.2.1
 =============================================
index 9c476ef..1ff2f3d 100644 (file)
@@ -1,4 +1,5 @@
 <%@page import="edu.internet2.middleware.shibboleth.common.profile.AbstractErrorHandler"%>
+<%@ taglib uri="/mdui" prefix="mdui" %>
 
 <html>
 
           Use of your browser's back button may cause specific errors that can be resolved by
           going back to your desired resource and trying to login again.
        </p>
+        <p>
+           If you think you were went here in error please contact <mdui:serviceContact>technical support</mdui:serviceContact>
+        </p>       
        <% 
        Throwable error = (Throwable) request.getAttribute(AbstractErrorHandler.ERROR_KEY);
           if(error != null){
        %>
        <strong>Error Message: <%= error.getMessage() %></strong>
        <% } %>
+
+
        
 </body>
 
diff --git a/src/main/webapp/login.css b/src/main/webapp/login.css
new file mode 100644 (file)
index 0000000..b92c50e
--- /dev/null
@@ -0,0 +1,62 @@
+div.loginbox {\r
+    background-color: #FFFFFF;\r
+    position: relative;\r
+    width: 840px;\r
+    height: 300px;\r
+}\r
+\r
+div.loginbox div.leftpane {\r
+    border: 2px #A40000 solid;\r
+    position: absolute;\r
+    top: 10px;\r
+    left: 10px;\r
+    width: 47%;\r
+    height: 90%;\r
+}\r
+\r
+div.loginbox div.rightpane {\r
+       border: 2px #A40000 solid;\r
+    position: absolute;\r
+    top: 10px;\r
+    right: 10px;\r
+    width: 47%;\r
+    height: 90%;\r
+    overflow: hidden;\r
+    text-align: center;\r
+}\r
+\r
+div.loginbox div.content{\r
+    padding-top: 5px;\r
+    padding-left: 7px;\r
+    padding-right: 7px;\r
+    margin:auto;\r
+    width:100%;\r
+}\r
+\r
+div.loginbox #splogo{\r
+    max-width: 95%;\r
+    max-height: 80%;\r
+}\r
+\r
+div.loginbox #clippedsplogo{\r
+    max-width: 95%;\r
+    max-height: 160px;\r
+}\r
+\r
+div.loginbox #spName{\r
+    padding-top:5px;\r
+    padding-bottom:5px;\r
+    font-size:1.2em;\r
+}\r
+\r
+div.loginbox #spDescription{\r
+    padding-top:15px;\r
+    text-align:left;\r
+}\r
+\r
+/*\r
+div.loginbox button, div {\r
+       height: 46px;\r
+       width: 80%;\r
+}\r
+*/\r
index 9450563..2ef396f 100644 (file)
@@ -1,89 +1,47 @@
-<%@ page import="edu.internet2.middleware.shibboleth.idp.authn.LoginContext" %>
-<%@ page import="edu.internet2.middleware.shibboleth.idp.authn.LoginHandler" %>
-<%@ page import="edu.internet2.middleware.shibboleth.idp.session.*" %>
-<%@ page import="edu.internet2.middleware.shibboleth.idp.util.HttpServletHelper" %>
-<%@ page import="org.opensaml.saml2.metadata.*" %>
-
-<%@ taglib uri="/mdui" prefix="mdui" %>
-
-
-<%
-    LoginContext loginContext = HttpServletHelper.getLoginContext(HttpServletHelper.getStorageService(application),
-                                                                  application, request);
-    Session userSession = HttpServletHelper.getUserSession(request);
-%>
-
-<html>
-
-    <head>
-        <title>Shibboleth Identity Provider - Example Login Page</title>
-    </head>
-       <body>
-
-        <img src="<%= request.getContextPath()%>/images/logo.jpg" />
-               <h1>Example Login Page</h1>
-               <p>This login page is an example and should be customized.  Refer to the 
-                       <a href="https://spaces.internet2.edu/display/SHIB2/IdPAuthUserPassLoginPage" target="_new"> documentation</a>.
-               </p>
-               
-               <div style="border: 2px solid;padding: 4px">
-                 The Following information is made available via the &lt;mdui:taglibs&gt; It is included purely as
-          an example.
-
-            <p>
-                Service Name = <mdui:serviceName/>
-            </p>
-
-            <p>
-                The service description: is <mdui:serviceDescription>not present</mdui:serviceDescription>
-            </p>
-                
-            <p>
-                Support text could read:  If you don't know why you got here please contact <mdui:serviceContact cssClass="claz1">your support desk</mdui:serviceContact>
-            </p>
-
-            <p>
-                <mdui:servicePrivacyURL cssId="id2" linkText="The PS Privacy Statement">No Privacy Statement</mdui:servicePrivacyURL>
-            </p>
-            
-            <p>
-                <mdui:serviceInformationURL cssStyle="font-style:Italic" linkText="More Information">No Information URL</mdui:serviceInformationURL>
-            </p>
-
-            <mdui:serviceLogo cssId="logoId" cssClass="class" minWidth="20" maxHeight="400">No logo available</mdui:serviceLogo>
-        </div>
-    
-
-               <% if (loginContext == null) { %>
-               <p><font color="red">Error:</font> Direct access to this page is not supported.</p>
-               <% } else { %>          
-               
-                       <h2>Shibboleth Identity Provider Login to Service Provider <%= loginContext.getRelyingPartyId() %></h2>
-                                       
-                       <% if (request.getAttribute(LoginHandler.AUTHENTICATION_EXCEPTION_KEY) != null) { %>
-                       <p><font color="red">Authentication Failed</font></p>
-                       <% } %>
-               
-                       <% if(request.getAttribute("actionUrl") != null){ %>
-                           <form action="<%=request.getAttribute("actionUrl")%>" method="post">
-                       <% }else{ %>
-                           <form action="j_security_check" method="post">
-                       <% } %>
-                       <table>
-                               <tr>
-                                       <td>Username:</td>
-                                       <td><input name="j_username" type="text" tabindex="1" /></td>
-                               </tr>
-                               <tr>
-                                       <td>Password:</td>
-                                       <td><input name="j_password" type="password" tabindex="2" /></td>
-                               </tr>
-                               <tr>
-                                       <td colspan="2"><input type="submit" value="Login" tabindex="3" /></td>
-                               </tr>
-                       </table>
-                       </form>
-               <%}%>
-       </body>
-       
+<%@ taglib uri="/mdui" prefix="mdui" %>\r
+<html>\r
+  <link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>/login.css"/>\r
+  <head>\r
+    <title>Shibboleth Identity Provider - Example Login Page</title>\r
+  </head>\r
+\r
+  <body id="homepage">\r
+    <img src="<%= request.getContextPath()%>/images/logo.jpg" />\r
+    <h1>Example Login Page</h1>\r
+    <p>This login page is an example and should be customized.  Refer to the \r
+       <a href="https://spaces.internet2.edu/display/SHIB2/IdPAuthUserPassLoginPage" target="_blank"> documentation</a>.\r
+    </p>\r
+\r
+    <div class="loginbox">\r
+       <div class="leftpane">\r
+         <div class="content">\r
+           <p>The web site described to the right has asked you to log in and you have chosen &lt;FILL IN YOUR SITE&gt; as your home institution</p>\r
+           <% if ("true".equals(request.getAttribute("loginFailed"))) { %>\r
+              <p><font color="red"> Credentials not recognized. </font> </p>\r
+           <% } %>\r
+           <% if(request.getAttribute("actionUrl") != null){ %>\r
+             <form action="<%=request.getAttribute("actionUrl")%>" method="post">\r
+           <% }else{ %>\r
+             <form action="j_security_check" method="post">\r
+           <% } %>\r
+           <table>\r
+             <tr><td width="40%"><label for="username">Username:</label></td><td><input name="j_username" type="text" /></td></tr>\r
+             <tr><td><label for="password">Password:</label></td><td><input name="j_password" type="password" /></td></tr>\r
+             <tr><td></td><td><button type="submit" value="Login" >Continue</button></td></tr>\r
+           </table></form>\r
+         </div>\r
+       </div>\r
+       <div class="rightpane">\r
+         <div class="content">\r
+           <div id="spName"><mdui:serviceName/></div>\r
+           <mdui:serviceLogo  minWidth="50" minHeight="160" cssId="clippedsplogo">\r
+             <mdui:serviceLogo maxWidth="338" minWidth="50" cssId="splogo"/>\r
+           </mdui:serviceLogo>\r
+           <div id="spDescription">\r
+             <mdui:serviceDescription>You have asked to login to <mdui:serviceName/></mdui:serviceDescription>\r
+           </div>\r
+         </div>\r
+      </div>\r
+    </div>\r
+  </body>\r
 </html>
\ No newline at end of file