<body>
<img src="<%= request.getContextPath() %>/images/logo.jpg" />
<h2>Shibboleth Identity Provider Login</h2>
+
+ <% if ("true".equals(request.getParameter("loginFailed"))) { %>
+ <p>Authentication Failed</p>
+ <% } %>
+
+ <form action="Authn/UserPassword" method="post">
<table>
<tr>
<td>Username:</td>
<td><input name="j_password" type="password" tabindex="2" /></td>
</tr>
<tr>
- <td rowspan="2"><button tabindex="3"/></td>
+ <td rowspan="2"><input type="submit" value="Login" tabindex="3" /></td>
</tr>
</table>
+ </form>
</html>
\ No newline at end of file
private final Logger log = LoggerFactory.getLogger(RemoteUserAuthServlet.class);
/** Name of JAAS configuration used to authenticate users. */
- private final String jaasConfigName = "ShibUserPassAuth";
+ private String jaasConfigName = "ShibUserPassAuth";
+
+ /** init-param which can be passed to the servlet to override the default JAAS config. */
+ private final String jaasInitParam = "jaasConfigName";
/** Login page name. */
- private final String loginPage = "login.jsp";
+ private String loginPage = "login.jsp";
+
+ /** init-param which can be passed to the servlet to override the default login page. */
+ private final String loginPageInitParam = "loginPage";
/** Parameter name to indicate login failure. */
private final String failureParam = "loginFailed";
private final String passwordAttribute = "j_password";
/** {@inheritDoc} */
+ public void init() {
+ if (getInitParameter(jaasInitParam) != null) {
+ jaasConfigName = getInitParameter(jaasInitParam);
+ }
+ if (getInitParameter(loginPageInitParam) != null) {
+ loginPage = getInitParameter(loginPageInitParam);
+ }
+ }
+
+ /** {@inheritDoc} */
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException,
IOException {
String username = DatatypeHelper.safeTrimOrNullString(request.getParameter(usernameAttribute));