Check for null login context on the login.jsp and print an error that the login page...
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 13 Sep 2010 14:42:41 +0000 (14:42 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 13 Sep 2010 14:42:41 +0000 (14:42 +0000)
Also, make it even more clear that the provided login page is an example page

git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/branches/REL_2@2949 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

doc/RELEASE-NOTES.txt
src/main/webapp/login.jsp

index 27c8382..751c7a9 100644 (file)
@@ -1,5 +1,6 @@
 Changes in Release 2.2.0
 =============================================
+[SIDP-411] - Check for loginContext != null at login.jsp
 [SIDP-409] - Pass IdP w/o authenticating
 [SIDP-407] - Shibboleth SSO profile handler sets incorrect protocol string in outbound message context
 [SIDP-402] - Update 3rd party libraries for 2.2 release
index b3db7e2..5b73471 100644 (file)
 <html>
 
     <head>
-        <title>Shibboleth Identity Provider - Login</title>
+        <title>Shibboleth Identity Provider - Example Login Page</title>
     </head>
 
        <body>
                <img src="<%= request.getContextPath() %>/images/logo.jpg" />
-               <h2>Shibboleth Identity Provider Login to Service Provider <%= loginContext.getRelyingPartyId() %></h2>
-               <p>
-        Existing Session: <%= userSession != null %><br/>      
-               Requested Authentication Methods: <%= loginContext.getRequestedAuthenticationMethods() %><br/>
-               Attempting Authentication Method: <%= loginContext.getAttemptedAuthnMethod() %> <br/>
-               Is Forced Authentication: <%= loginContext.isForceAuthRequired() %><br/>
+               <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/IdPAuthUserPass" target="_new"> documentation</a>.
                </p>
+
+               <% 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>
+                       <p>
+               Existing Session: <%= userSession != null %><br/>       
+                       Requested Authentication Methods: <%= loginContext.getRequestedAuthenticationMethods() %><br/>
+                       Attempting Authentication Method: <%= loginContext.getAttemptedAuthnMethod() %> <br/>
+                       Is Forced Authentication: <%= loginContext.isForceAuthRequired() %><br/>
+                       </p>
                
-               <% if (request.getAttribute(LoginHandler.AUTHENTICATION_EXCEPTION_KEY) != null) { %>
-               <p><font color="red">Authentication Failed</font></p>
-               <% } %>
+                       <% 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>
+                       <% 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>
        
 </html>
\ No newline at end of file