cffdf030d1b1bf6347dba13862d2e6a04e1eee99
[java-idp.git] / src / main / webapp / login.jsp
1 <%@ page import="edu.internet2.middleware.shibboleth.idp.authn.LoginContext" %>
2 <%@ page import="edu.internet2.middleware.shibboleth.idp.util.HttpServletHelper" %>
3 <%@ page import="org.opensaml.saml2.metadata.*" %>
4
5 <%
6    LoginContext loginContext = HttpServletHelper.getLoginContext(HttpServletHelper.getStorageService(application),
7                                                                  application, request);
8    EntityDescriptor entityDescriptor = HttpServletHelper.getRelyingPartyMetadata(loginContext.getRelyingPartyId(),
9                                                    HttpServletHelper.getRelyingPartyConfirmationManager(application));  
10 %>
11
12 <html>
13
14     <head>
15         <title>Shibboleth Identity Provider - Login</title>
16     </head>
17
18         <body>
19                 <img src="<%= request.getContextPath() %>/images/logo.jpg" />
20                 <h2>Shibboleth Identity Provider Login to <%= entityDescriptor.getEntityID() %></h2>
21                 
22                 <% if ("true".equals(request.getAttribute("loginFailed"))) { %>
23                 <p><font color="red">Authentication Failed</font></p>
24                 <% } %>
25                 
26                 <% if(request.getAttribute("actionUrl") != null){ %>
27                     <form action="<%=request.getAttribute("actionUrl")%>" method="post">
28                 <% }else{ %>
29                     <form action="j_security_check" method="post">
30                 <% } %>
31                 <table>
32                         <tr>
33                                 <td>Username:</td>
34                                 <td><input name="j_username" type="text" tabindex="1" /></td>
35                         </tr>
36                         <tr>
37                                 <td>Password:</td>
38                                 <td><input name="j_password" type="password" tabindex="2" /></td>
39                         </tr>
40                         <tr>
41                                 <td colspan="2"><input type="submit" value="Login" tabindex="3" /></td>
42                         </tr>
43                 </table>
44                 </form>
45         </body>
46         
47 </html>