diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/DefaultLoginPageConfigurerTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/DefaultLoginPageConfigurerTests.groovy index 08b389ef0b..ac128b1fe9 100644 --- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/DefaultLoginPageConfigurerTests.groovy +++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/DefaultLoginPageConfigurerTests.groovy @@ -1,5 +1,3 @@ - - /* * Copyright 2002-2013 the original author or authors. * @@ -57,12 +55,12 @@ public class DefaultLoginPageConfigurerTests extends BaseSpringSpec { then: response.getContentAsString() == """Login Page

Login with Username and Password

- +
-
User:
Password:
+
""" when: "fail to log in" super.setup() @@ -81,12 +79,12 @@ public class DefaultLoginPageConfigurerTests extends BaseSpringSpec { then: response.getContentAsString() == """Login Page

Your login attempt was not successful, try again.

Reason: Bad credentials

Login with Username and Password

- +
-
User:
Password:
+
""" when: "login success" super.setup() @@ -110,12 +108,12 @@ public class DefaultLoginPageConfigurerTests extends BaseSpringSpec { then: "sent to default success page" response.getContentAsString() == """Login Page

You have been logged out

Login with Username and Password

- +
-
User:
Password:
+
""" } @@ -195,13 +193,13 @@ public class DefaultLoginPageConfigurerTests extends BaseSpringSpec { then: response.getContentAsString() == """Login Page

Login with Username and Password

- +
-
User:
Password:
Remember me on this computer.
+
""" } @@ -227,10 +225,10 @@ public class DefaultLoginPageConfigurerTests extends BaseSpringSpec { springSecurityFilterChain.doFilter(request,response,chain) then: response.getContentAsString() == """Login Page

Login with OpenID Identity

- +
-
Identity:
+
""" } @@ -256,19 +254,19 @@ public class DefaultLoginPageConfigurerTests extends BaseSpringSpec { then: response.getContentAsString() == """Login Page

Login with Username and Password

- +
-
User:
Password:
Remember me on this computer.
+

Login with OpenID Identity

- +
-
Identity:
Remember me on this computer.
+
""" } diff --git a/config/src/test/groovy/org/springframework/security/config/http/FormLoginBeanDefinitionParserTests.groovy b/config/src/test/groovy/org/springframework/security/config/http/FormLoginBeanDefinitionParserTests.groovy index 42c8d9b49a..801e2820ba 100644 --- a/config/src/test/groovy/org/springframework/security/config/http/FormLoginBeanDefinitionParserTests.groovy +++ b/config/src/test/groovy/org/springframework/security/config/http/FormLoginBeanDefinitionParserTests.groovy @@ -24,11 +24,11 @@ class FormLoginBeanDefinitionParserTests extends AbstractHttpConfigTests { then: response.getContentAsString() == """Login Page

Login with Username and Password

- +
-
User:
Password:
+
""" } @@ -47,11 +47,11 @@ class FormLoginBeanDefinitionParserTests extends AbstractHttpConfigTests { then: response.getContentAsString() == """Login Page

Login with Username and Password

- +
-
User:
Password:
+
""" } @@ -70,16 +70,16 @@ class FormLoginBeanDefinitionParserTests extends AbstractHttpConfigTests { then: response.getContentAsString() == """Login Page

Login with Username and Password

- +
-
User:
Password:
+

Login with OpenID Identity

- +
-
Identity:
+
""" } @@ -98,16 +98,16 @@ class FormLoginBeanDefinitionParserTests extends AbstractHttpConfigTests { then: response.getContentAsString() == """Login Page

Login with Username and Password

- +
-
User:
Password:
+

Login with OpenID Identity

- +
-
Identity:
+
""" } } diff --git a/web/src/main/java/org/springframework/security/web/authentication/ui/DefaultLoginPageGeneratingFilter.java b/web/src/main/java/org/springframework/security/web/authentication/ui/DefaultLoginPageGeneratingFilter.java index 341e914391..88ca54fd26 100644 --- a/web/src/main/java/org/springframework/security/web/authentication/ui/DefaultLoginPageGeneratingFilter.java +++ b/web/src/main/java/org/springframework/security/web/authentication/ui/DefaultLoginPageGeneratingFilter.java @@ -199,21 +199,21 @@ public class DefaultLoginPageGeneratingFilter extends GenericFilterBean { sb.append("

Login with Username and Password

"); sb.append("
\n"); - sb.append(" \n"); - sb.append(" \n"); - sb.append(" \n"); if (rememberMeParameter != null) { - sb.append(" \n"); } - sb.append(" \n"); + sb.append(" \n"); renderHiddenInputs(sb, request); - sb.append("
User:
Password:
Remember me on this computer.
\n"); + sb.append("\n"); sb.append("
"); } @@ -221,18 +221,18 @@ public class DefaultLoginPageGeneratingFilter extends GenericFilterBean { sb.append("

Login with OpenID Identity

"); sb.append("
\n"); - sb.append(" \n"); - sb.append(" \n"); if (openIDrememberMeParameter != null) { - sb.append(" \n"); } - sb.append(" \n"); - sb.append("
Identity:
Remember me on this computer.
\n"); + sb.append(" \n"); + sb.append("\n"); renderHiddenInputs(sb, request); sb.append("
"); } @@ -246,7 +246,7 @@ public class DefaultLoginPageGeneratingFilter extends GenericFilterBean { CsrfToken token = (CsrfToken) request.getAttribute(CsrfToken.class.getName()); if (token != null) { - sb.append(" \n"); } }