Hardcode ott-username input name in DefaultLoginPageGeneratingFilter
- GenerateOneTimeTokenFilter uses `"username"`, the default UI should use the same parameter name
This commit is contained in:
parent
c0a10b90ba
commit
33495441b5
|
@ -242,8 +242,8 @@ public class DefaultLoginPageGeneratingFilter extends GenericFilterBean {
|
|||
sb.append(" <h2>Request a One-Time Token</h2>\n");
|
||||
sb.append(createError(loginError, errorMsg) + createLogoutSuccess(logoutSuccess) + "<p>\n");
|
||||
sb.append(" <label for=\"ott-username\" class=\"screenreader\">Username</label>\n");
|
||||
sb.append(" <input type=\"text\" id=\"ott-username\" name=\"" + this.usernameParameter
|
||||
+ "\" placeholder=\"Username\" required>\n");
|
||||
sb.append(
|
||||
" <input type=\"text\" id=\"ott-username\" name=\"username\" placeholder=\"Username\" required>\n");
|
||||
sb.append(" </p>\n");
|
||||
sb.append(renderHiddenInputs(request));
|
||||
sb.append(" <button class=\"primary\" type=\"submit\" form=\"ott-form\">Send Token</button>\n");
|
||||
|
|
|
@ -199,7 +199,7 @@ public class DefaultLoginPageGeneratingFilterTests {
|
|||
<h2>Request a One-Time Token</h2>
|
||||
<p>
|
||||
<label for="ott-username" class="screenreader">Username</label>
|
||||
<input type="text" id="ott-username" name="null" placeholder="Username" required>
|
||||
<input type="text" id="ott-username" name="username" placeholder="Username" required>
|
||||
</p>
|
||||
<button class="primary" type="submit" form="ott-form">Send Token</button>
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue