From 5eb5c91d862517a477447aa8f8d8307b3af42409 Mon Sep 17 00:00:00 2001 From: Oliver Becker Date: Tue, 5 Mar 2013 19:08:08 +0100 Subject: [PATCH] SEC-2119: Rename rememberme-parameter to remember-me-parameter This change extends pull request https://github.com/SpringSource/spring-security/pull/26 and its subsequent changes by renaming the attribute name 'rememberme-parameter' to 'remember-me-parameter'. The spelling including the additional hyphen in 'remember-me-parameter' is more consistent with the default spelling of the 'remember-me' functionality. --- .../config/http/RememberMeBeanDefinitionParser.java | 2 +- .../security/config/spring-security-3.2.rnc | 2 +- .../security/config/spring-security-3.2.xsd | 2 +- .../security/config/http/RememberMeConfigTests.groovy | 10 +++++----- docs/manual/src/docbook/appendix-namespace.xml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config/src/main/java/org/springframework/security/config/http/RememberMeBeanDefinitionParser.java b/config/src/main/java/org/springframework/security/config/http/RememberMeBeanDefinitionParser.java index f4b1a9ebf2..a0e2501f1e 100644 --- a/config/src/main/java/org/springframework/security/config/http/RememberMeBeanDefinitionParser.java +++ b/config/src/main/java/org/springframework/security/config/http/RememberMeBeanDefinitionParser.java @@ -49,7 +49,7 @@ class RememberMeBeanDefinitionParser implements BeanDefinitionParser { static final String ATT_SUCCESS_HANDLER_REF = "authentication-success-handler-ref"; static final String ATT_TOKEN_VALIDITY = "token-validity-seconds"; static final String ATT_SECURE_COOKIE = "use-secure-cookie"; - static final String ATT_FORM_REMEMBERME_PARAMETER = "rememberme-parameter"; + static final String ATT_FORM_REMEMBERME_PARAMETER = "remember-me-parameter"; protected final Log logger = LogFactory.getLog(getClass()); private final String key; diff --git a/config/src/main/resources/org/springframework/security/config/spring-security-3.2.rnc b/config/src/main/resources/org/springframework/security/config/spring-security-3.2.rnc index 3cff87ebea..2dbf05803a 100644 --- a/config/src/main/resources/org/springframework/security/config/spring-security-3.2.rnc +++ b/config/src/main/resources/org/springframework/security/config/spring-security-3.2.rnc @@ -579,7 +579,7 @@ remember-me.attlist &= attribute authentication-success-handler-ref {xsd:token}? remember-me.attlist &= ## The name of the request parameter which toggles remember-me authentication. Defaults to '_spring_security_remember_me'. - attribute rememberme-parameter {xsd:token}? + attribute remember-me-parameter {xsd:token}? token-repository-ref = ## Reference to a PersistentTokenRepository bean for use with the persistent token remember-me implementation. diff --git a/config/src/main/resources/org/springframework/security/config/spring-security-3.2.xsd b/config/src/main/resources/org/springframework/security/config/spring-security-3.2.xsd index aa0c860545..719d9a3569 100644 --- a/config/src/main/resources/org/springframework/security/config/spring-security-3.2.xsd +++ b/config/src/main/resources/org/springframework/security/config/spring-security-3.2.xsd @@ -1801,7 +1801,7 @@ - + The name of the request parameter which toggles remember-me authentication. Defaults to '_spring_security_remember_me'. diff --git a/config/src/test/groovy/org/springframework/security/config/http/RememberMeConfigTests.groovy b/config/src/test/groovy/org/springframework/security/config/http/RememberMeConfigTests.groovy index e9c0ff28d8..197b729956 100644 --- a/config/src/test/groovy/org/springframework/security/config/http/RememberMeConfigTests.groovy +++ b/config/src/test/groovy/org/springframework/security/config/http/RememberMeConfigTests.groovy @@ -214,7 +214,7 @@ class RememberMeConfigTests extends AbstractHttpConfigTests { notThrown BeanDefinitionParsingException } - def 'Default form-parameter is correct'() { + def 'Default remember-me-parameter is correct'() { httpAutoConfig () { 'remember-me'() } @@ -225,9 +225,9 @@ class RememberMeConfigTests extends AbstractHttpConfigTests { } // SEC-2119 - def 'Custom form-parameter is supported'() { + def 'Custom remember-me-parameter is supported'() { httpAutoConfig () { - 'remember-me'('rememberme-parameter': 'ourParam') + 'remember-me'('remember-me-parameter': 'ourParam') } createAppContext(AUTH_PROVIDER_XML) @@ -235,10 +235,10 @@ class RememberMeConfigTests extends AbstractHttpConfigTests { rememberMeServices().parameter == 'ourParam' } - def 'form-parameter cannot be used together with services-ref'() { + def 'remember-me-parameter cannot be used together with services-ref'() { when: httpAutoConfig () { - 'remember-me'('rememberme-parameter': 'ourParam', 'services-ref': 'ourService') + 'remember-me'('remember-me-parameter': 'ourParam', 'services-ref': 'ourService') } createAppContext(AUTH_PROVIDER_XML) then: diff --git a/docs/manual/src/docbook/appendix-namespace.xml b/docs/manual/src/docbook/appendix-namespace.xml index 2c4390db1e..93dd452b3d 100644 --- a/docs/manual/src/docbook/appendix-namespace.xml +++ b/docs/manual/src/docbook/appendix-namespace.xml @@ -842,8 +842,8 @@ PersistentTokenBasedRememberMeServices will be used and configured with a JdbcTokenRepositoryImpl instance. -
- <literal>form-parameter</literal> +
+ <literal>remember-me-parameter</literal> The name of the request parameter which toggles remember-me authentication. Defaults to "_spring_security_remember_me". Maps to the "parameter" property of AbstractRememberMeServices.