diff --git a/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/LdapAuthenticationProviderBuilderSecurityBuilderTests.groovy b/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/LdapAuthenticationProviderBuilderSecurityBuilderTests.groovy index e47a834571..16cb7117c4 100644 --- a/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/LdapAuthenticationProviderBuilderSecurityBuilderTests.groovy +++ b/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/LdapAuthenticationProviderBuilderSecurityBuilderTests.groovy @@ -53,8 +53,7 @@ class LdapAuthenticationProviderBuilderSecurityBuilderTests extends BaseSpringSp @Configuration static class DefaultLdapConfig extends BaseLdapProviderConfig { - protected void registerAuthentication( - AuthenticationManagerBuilder auth) throws Exception { + protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth .ldapAuthentication() .contextSource(contextSource()) @@ -71,7 +70,7 @@ class LdapAuthenticationProviderBuilderSecurityBuilderTests extends BaseSpringSp @Configuration static class GroupRolesConfig extends BaseLdapProviderConfig { - protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception { + protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth .ldapAuthentication() .contextSource(contextSource()) @@ -89,8 +88,7 @@ class LdapAuthenticationProviderBuilderSecurityBuilderTests extends BaseSpringSp @Configuration static class GroupSearchConfig extends BaseLdapProviderConfig { - protected void registerAuthentication( - AuthenticationManagerBuilder auth) throws Exception { + protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth .ldapAuthentication() .contextSource(contextSource()) @@ -108,8 +106,7 @@ class LdapAuthenticationProviderBuilderSecurityBuilderTests extends BaseSpringSp @Configuration static class RolePrefixConfig extends BaseLdapProviderConfig { - protected void registerAuthentication( - AuthenticationManagerBuilder auth) throws Exception { + protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth .ldapAuthentication() .contextSource(contextSource()) @@ -128,8 +125,7 @@ class LdapAuthenticationProviderBuilderSecurityBuilderTests extends BaseSpringSp @Configuration static class BindAuthenticationConfig extends BaseLdapServerConfig { - protected void registerAuthentication( - AuthenticationManagerBuilder auth) throws Exception { + protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth .ldapAuthentication() .contextSource(contextSource()) @@ -154,15 +150,6 @@ class LdapAuthenticationProviderBuilderSecurityBuilderTests extends BaseSpringSp @Configuration static abstract class BaseLdapProviderConfig { - @Bean - public AuthenticationManager authenticationManager() { - AuthenticationManagerBuilder registry = new AuthenticationManagerBuilder(); - registerAuthentication(registry); - return registry.build(); - } - - protected abstract void registerAuthentication( - AuthenticationManagerBuilder auth) throws Exception; @Bean public BaseLdapPathContextSource contextSource() throws Exception { diff --git a/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/NamespaceLdapAuthenticationProviderTestsConfigs.java b/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/NamespaceLdapAuthenticationProviderTestsConfigs.java index 094a0b133c..952ded6415 100644 --- a/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/NamespaceLdapAuthenticationProviderTestsConfigs.java +++ b/config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/NamespaceLdapAuthenticationProviderTestsConfigs.java @@ -31,8 +31,7 @@ public class NamespaceLdapAuthenticationProviderTestsConfigs { @Configuration @EnableWebSecurity static class LdapAuthenticationProviderConfig extends WebSecurityConfigurerAdapter { - protected void registerAuthentication( - AuthenticationManagerBuilder auth) throws Exception { + protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth .ldapAuthentication() .groupSearchBase("ou=groups") @@ -43,8 +42,7 @@ public class NamespaceLdapAuthenticationProviderTestsConfigs { @Configuration @EnableWebSecurity static class CustomLdapAuthenticationProviderConfig extends WebSecurityConfigurerAdapter { - protected void registerAuthentication( - AuthenticationManagerBuilder auth) throws Exception { + protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth .ldapAuthentication() .groupRoleAttribute("cn") // ldap-authentication-provider@group-role-attribute @@ -70,8 +68,7 @@ public class NamespaceLdapAuthenticationProviderTestsConfigs { @Configuration @EnableWebSecurity static class PasswordCompareLdapConfig extends WebSecurityConfigurerAdapter { - protected void registerAuthentication( - AuthenticationManagerBuilder auth) throws Exception { + protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth .ldapAuthentication() .groupSearchBase("ou=groups") diff --git a/config/src/main/java/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfiguration.java b/config/src/main/java/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfiguration.java index 2faafc63ac..12d63ad5c5 100644 --- a/config/src/main/java/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfiguration.java +++ b/config/src/main/java/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfiguration.java @@ -236,8 +236,8 @@ public class GlobalMethodSecurityConfiguration implements ImportAware { /** * Allows providing a custom {@link AuthenticationManager}. The default is - * to use any authentication mechanisms registered by {@link #registerAuthentication(AuthenticationManagerBuilder)}. If - * {@link #registerAuthentication(AuthenticationManagerBuilder)} was not overriden, then an {@link AuthenticationManager} + * to use any authentication mechanisms registered by {@link #configure(AuthenticationManagerBuilder)}. If + * {@link #configure(AuthenticationManagerBuilder)} was not overridden, then an {@link AuthenticationManager} * is attempted to be autowired by type. * * @return @@ -247,7 +247,7 @@ public class GlobalMethodSecurityConfiguration implements ImportAware { DefaultAuthenticationEventPublisher eventPublisher = objectPostProcessor.postProcess(new DefaultAuthenticationEventPublisher()); auth.authenticationEventPublisher(eventPublisher); auth.objectPostProcessor(objectPostProcessor); - registerAuthentication(auth); + configure(auth); if(!disableAuthenticationRegistry) { authenticationManager = auth.build(); } @@ -267,13 +267,13 @@ public class GlobalMethodSecurityConfiguration implements ImportAware { /** * Sub classes can override this method to register different types of authentication. If not overridden, - * {@link #registerAuthentication(AuthenticationManagerBuilder)} will attempt to autowire by type. + * {@link #configure(AuthenticationManagerBuilder)} will attempt to autowire by type. * * @param auth the {@link AuthenticationManagerBuilder} used to register different authentication mechanisms for the * global method security. * @throws Exception */ - protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception { + protected void configure(AuthenticationManagerBuilder auth) throws Exception { this.disableAuthenticationRegistry = true; } diff --git a/config/src/main/java/org/springframework/security/config/annotation/web/builders/HttpSecurity.java b/config/src/main/java/org/springframework/security/config/annotation/web/builders/HttpSecurity.java index 94d3b676fa..e397db99f2 100644 --- a/config/src/main/java/org/springframework/security/config/annotation/web/builders/HttpSecurity.java +++ b/config/src/main/java/org/springframework/security/config/annotation/web/builders/HttpSecurity.java @@ -98,7 +98,7 @@ import org.springframework.util.Assert; * } * * @Override - * protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception { + * protected void configure(AuthenticationManagerBuilder auth) throws Exception { * auth * .inMemoryAuthentication() * .withUser("user") @@ -157,7 +157,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder * @Override - * protected void registerAuthentication(AuthenticationManagerBuilder auth) { + * protected void configure(AuthenticationManagerBuilder auth) { * auth * // enable in memory based authentication with a user named * // "user" and "admin" @@ -153,7 +153,7 @@ public abstract class WebSecurityConfigurerAdapter implements SecurityConfigurer * the {@link AuthenticationManagerBuilder} to use * @throws Exception */ - protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception { + protected void configure(AuthenticationManagerBuilder auth) throws Exception { this.disableAuthenticationRegistration = true; } @@ -201,7 +201,7 @@ public abstract class WebSecurityConfigurerAdapter implements SecurityConfigurer /** * Override this method to expose the {@link AuthenticationManager} from - * {@link #registerAuthentication(AuthenticationManagerBuilder)} to be exposed as + * {@link #configure(AuthenticationManagerBuilder)} to be exposed as * a Bean. For example: * *
@@ -221,7 +221,7 @@ public abstract class WebSecurityConfigurerAdapter implements SecurityConfigurer
 
     /**
      * Gets the {@link AuthenticationManager} to use. The default strategy is if
-     * {@link #registerAuthentication(AuthenticationManagerBuilder)} method is
+     * {@link #configure(AuthenticationManagerBuilder)} method is
      * overridden to use the {@link AuthenticationManagerBuilder} that was passed in.
      * Otherwise, autowire the {@link AuthenticationManager} by type.
      *
@@ -230,7 +230,7 @@ public abstract class WebSecurityConfigurerAdapter implements SecurityConfigurer
      */
     protected AuthenticationManager authenticationManager() throws Exception {
         if(!authenticationManagerInitialized) {
-            registerAuthentication(parentAuthenticationBuilder);
+            configure(parentAuthenticationBuilder);
             if(disableAuthenticationRegistration) {
                 try {
                     authenticationManager = context.getBean(AuthenticationManagerBuilder.class).getOrBuild();
@@ -254,7 +254,7 @@ public abstract class WebSecurityConfigurerAdapter implements SecurityConfigurer
 
     /**
      * Override this method to expose a {@link UserDetailsService} created from
-     * {@link #registerAuthentication(AuthenticationManagerBuilder)} as a bean. In
+     * {@link #configure(AuthenticationManagerBuilder)} as a bean. In
      * general only the following override should be done of this method:
      *
      * 
diff --git a/config/src/main/java/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurer.java b/config/src/main/java/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurer.java
index f5f5df2cfc..495a8f65d6 100644
--- a/config/src/main/java/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurer.java
+++ b/config/src/main/java/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurer.java
@@ -124,7 +124,7 @@ public final class RememberMeConfigurer> extend
      * {@link UserDetails} when a remember me token is valid. The default is to
      * use the {@link UserDetailsService} found by invoking
      * {@link HttpSecurity#getSharedObject(Class)} which is set when using
-     * {@link WebSecurityConfigurerAdapter#registerAuthentication(org.springframework.security.config.annotation.authentication.AuthenticationManagerBuilder)}.
+     * {@link WebSecurityConfigurerAdapter#configure(AuthenticationManagerBuilder)}.
      * Alternatively, one can populate {@link #rememberMeServices(RememberMeServices)}.
      *
      * @param userDetailsService
diff --git a/config/src/main/java/org/springframework/security/config/annotation/web/configurers/openid/OpenIDLoginConfigurer.java b/config/src/main/java/org/springframework/security/config/annotation/web/configurers/openid/OpenIDLoginConfigurer.java
index 58adb80563..14f1082124 100644
--- a/config/src/main/java/org/springframework/security/config/annotation/web/configurers/openid/OpenIDLoginConfigurer.java
+++ b/config/src/main/java/org/springframework/security/config/annotation/web/configurers/openid/OpenIDLoginConfigurer.java
@@ -75,7 +75,7 @@ import org.springframework.security.web.util.matcher.RequestMatcher;
  * 	}
  *
  * 	@Override
- * 	protected void registerAuthentication(
+ * 	protected void configure(AuthenticationManagerBuilder auth)(
  * 			AuthenticationManagerBuilder auth) throws Exception {
  * 		auth
  * 			.inMemoryAuthentication()
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/authentication/AuthenticationManagerBuilderTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/authentication/AuthenticationManagerBuilderTests.groovy
index 9bcda771d3..c030bf4600 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/authentication/AuthenticationManagerBuilderTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/authentication/AuthenticationManagerBuilderTests.groovy
@@ -47,7 +47,7 @@ class AuthenticationManagerBuilderTests extends BaseSpringSpec {
     }
 
     // https://github.com/SpringSource/spring-security-javaconfig/issues/132
-    def "#132 Custom AuthenticationEventPublisher with Web registerAuthentication"() {
+    def "#132 Custom AuthenticationEventPublisher with Web configure(AuthenticationManagerBuilder)"() {
         setup:
             AuthenticationEventPublisher aep = Mock()
         when:
@@ -78,7 +78,7 @@ class AuthenticationManagerBuilderTests extends BaseSpringSpec {
     @EnableWebSecurity
     @Configuration
     static class MultiAuthenticationProvidersConfig extends WebSecurityConfigurerAdapter {
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER").and()
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/authentication/BaseAuthenticationConfig.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/authentication/BaseAuthenticationConfig.groovy
index f0e82c2efa..b0a33a998f 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/authentication/BaseAuthenticationConfig.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/authentication/BaseAuthenticationConfig.groovy
@@ -35,8 +35,7 @@ import org.springframework.security.core.userdetails.UserDetailsService;
 @Configuration
 class BaseAuthenticationConfig {
     @Autowired
-    protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
         auth
             .inMemoryAuthentication()
                 .withUser("user").password("password").roles("USER").and()
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationManagerTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationManagerTests.groovy
index 385fd1875e..ccb6da3544 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationManagerTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationManagerTests.groovy
@@ -47,7 +47,7 @@ class NamespaceAuthenticationManagerTests extends BaseSpringSpec {
     @EnableWebSecurity
     @Configuration
     static class EraseCredentialsTrueDefaultConfig extends WebSecurityConfigurerAdapter {
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
@@ -74,7 +74,7 @@ class NamespaceAuthenticationManagerTests extends BaseSpringSpec {
     @EnableWebSecurity
     @Configuration
     static class EraseCredentialsFalseConfig extends WebSecurityConfigurerAdapter {
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .eraseCredentials(false)
                 .inMemoryAuthentication()
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationProviderTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationProviderTests.groovy
index a0a0b95e95..ffe8e31f01 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationProviderTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationProviderTests.groovy
@@ -42,7 +42,7 @@ class NamespaceAuthenticationProviderTests extends BaseSpringSpec {
     @Configuration
     static class AuthenticationProviderRefConfig extends WebSecurityConfigurerAdapter {
         static DaoAuthenticationProvider expected = new DaoAuthenticationProvider()
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .authenticationProvider(expected)
         }
@@ -67,7 +67,7 @@ class NamespaceAuthenticationProviderTests extends BaseSpringSpec {
     @Configuration
     static class UserServiceRefConfig extends WebSecurityConfigurerAdapter {
         static InMemoryUserDetailsManager expected = new InMemoryUserDetailsManager([] as Collection)
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .userDetailsService(expected)
         }
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceJdbcUserServiceTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceJdbcUserServiceTests.groovy
index 039ceb9237..5b8e74b119 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceJdbcUserServiceTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceJdbcUserServiceTests.groovy
@@ -54,7 +54,7 @@ class NamespaceJdbcUserServiceTests extends BaseSpringSpec {
         @Autowired
         private DataSource dataSource;
 
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .jdbcAuthentication()
                     .dataSource(dataSource) // jdbc-user-service@data-source-ref
@@ -84,7 +84,7 @@ class NamespaceJdbcUserServiceTests extends BaseSpringSpec {
         @Autowired
         private DataSource dataSource;
 
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .jdbcAuthentication()
                     .dataSource(dataSource)
@@ -132,7 +132,7 @@ class NamespaceJdbcUserServiceTests extends BaseSpringSpec {
         @Autowired
         private DataSource dataSource;
 
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .jdbcAuthentication()
                     // jdbc-user-service@dataSource
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespacePasswordEncoderTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespacePasswordEncoderTests.groovy
index c62a13c1c1..3ba4521974 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespacePasswordEncoderTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespacePasswordEncoderTests.groovy
@@ -54,8 +54,7 @@ class NamespacePasswordEncoderTests extends BaseSpringSpec {
     @Configuration
     static class PasswordEncoderWithInMemoryConfig extends WebSecurityConfigurerAdapter {
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
 
             BCryptPasswordEncoder encoder = new BCryptPasswordEncoder()
             auth
@@ -76,8 +75,7 @@ class NamespacePasswordEncoderTests extends BaseSpringSpec {
     @Configuration
     static class PasswordEncoderWithJdbcConfig extends WebSecurityConfigurerAdapter {
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
 
             BCryptPasswordEncoder encoder = new BCryptPasswordEncoder()
             auth
@@ -106,8 +104,7 @@ class NamespacePasswordEncoderTests extends BaseSpringSpec {
     @Configuration
     static class PasswordEncoderWithUserDetailsServiceConfig extends WebSecurityConfigurerAdapter {
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
 
             BCryptPasswordEncoder encoder = new BCryptPasswordEncoder()
             User user = new User("user",encoder.encode("password"), AuthorityUtils.createAuthorityList("ROLE_USER"))
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/authentication/PasswordEncoderConfigurerConfigs.java b/config/src/test/groovy/org/springframework/security/config/annotation/authentication/PasswordEncoderConfigurerConfigs.java
index 8d9065b150..148477e4ed 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/authentication/PasswordEncoderConfigurerConfigs.java
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/authentication/PasswordEncoderConfigurerConfigs.java
@@ -37,8 +37,7 @@ public class PasswordEncoderConfigurerConfigs {
     @EnableWebSecurity
     @Configuration
     static class PasswordEncoderConfig extends WebSecurityConfigurerAdapter {
-        protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             BCryptPasswordEncoder encoder = passwordEncoder();
             auth
                 .inMemoryAuthentication()
@@ -66,8 +65,7 @@ public class PasswordEncoderConfigurerConfigs {
     @EnableWebSecurity
     @Configuration
     static class PasswordEncoderNoAuthManagerLoadsConfig extends WebSecurityConfigurerAdapter {
-        protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             BCryptPasswordEncoder encoder = passwordEncoder();
             auth
                 .inMemoryAuthentication()
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfigurationTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfigurationTests.groovy
index c17105185b..a89151a426 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfigurationTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfigurationTests.groovy
@@ -69,8 +69,7 @@ public class GlobalMethodSecurityConfigurationTests extends BaseSpringSpec {
         static AuthenticationSuccessEvent EVENT
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
         }
@@ -101,8 +100,7 @@ public class GlobalMethodSecurityConfigurationTests extends BaseSpringSpec {
         static AuthenticationTrustResolver TR
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
         }
@@ -135,8 +133,7 @@ public class GlobalMethodSecurityConfigurationTests extends BaseSpringSpec {
     static class ExpressionHandlerHasBeanResolverSetConfig extends GlobalMethodSecurityConfiguration {
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
         }
@@ -188,8 +185,7 @@ public class GlobalMethodSecurityConfigurationTests extends BaseSpringSpec {
     static class MethodSecurityServiceConfig extends GlobalMethodSecurityConfiguration {
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
         }
@@ -225,8 +221,7 @@ public class GlobalMethodSecurityConfigurationTests extends BaseSpringSpec {
         static PermissionEvaluator PE
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
         }
@@ -255,8 +250,7 @@ public class GlobalMethodSecurityConfigurationTests extends BaseSpringSpec {
         static PermissionEvaluator PE
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
         }
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/method/configuration/SampleEnableGlobalMethodSecurityTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/method/configuration/SampleEnableGlobalMethodSecurityTests.groovy
index a6d32879f0..74efb72889 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/method/configuration/SampleEnableGlobalMethodSecurityTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/method/configuration/SampleEnableGlobalMethodSecurityTests.groovy
@@ -67,7 +67,7 @@ public class SampleEnableGlobalMethodSecurityTests extends BaseSpringSpec {
         }
 
         @Autowired
-        public void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER").and()
@@ -104,8 +104,7 @@ public class SampleEnableGlobalMethodSecurityTests extends BaseSpringSpec {
         }
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-            throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                 .withUser("user").password("password").roles("USER").and()
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/SampleWebSecurityConfigurerAdapterTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/SampleWebSecurityConfigurerAdapterTests.groovy
index ba6f1609ce..37707da0e1 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/SampleWebSecurityConfigurerAdapterTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/SampleWebSecurityConfigurerAdapterTests.groovy
@@ -91,7 +91,7 @@ public class SampleWebSecurityConfigurerAdapterTests extends BaseSpringSpec {
     @EnableWebSecurity
     public static class HelloWorldWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) {
+        protected void configure(AuthenticationManagerBuilder auth) {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER");
@@ -179,7 +179,7 @@ public class SampleWebSecurityConfigurerAdapterTests extends BaseSpringSpec {
         }
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) {
+        protected void configure(AuthenticationManagerBuilder auth) {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER").and()
@@ -276,7 +276,7 @@ public class SampleWebSecurityConfigurerAdapterTests extends BaseSpringSpec {
     @EnableWebSecurity
     public static class SampleMultiHttpSecurityConfig {
         @Autowired
-        public void registerAuthentication(AuthenticationManagerBuilder auth) {
+        protected void configure(AuthenticationManagerBuilder auth) {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER").and()
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterTests.groovy
index 6df4cc91e2..fbe509d5b8 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterTests.groovy
@@ -89,8 +89,7 @@ class WebSecurityConfigurerAdapterTests extends BaseSpringSpec {
     static class HeadersArePopulatedByDefaultConfig extends WebSecurityConfigurerAdapter {
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
@@ -114,8 +113,7 @@ class WebSecurityConfigurerAdapterTests extends BaseSpringSpec {
     static class WebAsyncPopulatedByDefaultConfig extends WebSecurityConfigurerAdapter {
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
@@ -127,7 +125,7 @@ class WebSecurityConfigurerAdapterTests extends BaseSpringSpec {
         }
     }
 
-    def "AuthenticationEventPublisher is registered for Web registerAuthentication"() {
+    def "AuthenticationEventPublisher is registered for Web configure(AuthenticationManagerBuilder auth)"() {
         when:
             loadConfig(InMemoryAuthWithWebSecurityConfigurerAdapter)
         then:
@@ -152,8 +150,7 @@ class WebSecurityConfigurerAdapterTests extends BaseSpringSpec {
         }
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
@@ -236,8 +233,7 @@ class WebSecurityConfigurerAdapterTests extends BaseSpringSpec {
         }
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterTestsConfigs.java b/config/src/test/groovy/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterTestsConfigs.java
index 8a42d2e5cf..01add8bf1b 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterTestsConfigs.java
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterTestsConfigs.java
@@ -61,8 +61,7 @@ public class WebSecurityConfigurerAdapterTestsConfigs {
         }
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication().and()
                 .jdbcAuthentication()
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configuration/BaseWebConfig.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configuration/BaseWebConfig.groovy
index a9557a64fd..42961ae381 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configuration/BaseWebConfig.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configuration/BaseWebConfig.groovy
@@ -32,8 +32,7 @@ public abstract class BaseWebConfig extends WebSecurityConfigurerAdapter {
     BaseWebConfig() {
     }
 
-    protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
         auth
             .inMemoryAuthentication()
                 .withUser("user").password("password").roles("USER").and()
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configuration/EnableWebSecurityTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configuration/EnableWebSecurityTests.groovy
index 10affc9652..3c2541e319 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configuration/EnableWebSecurityTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configuration/EnableWebSecurityTests.groovy
@@ -45,8 +45,7 @@ class EnableWebSecurityTests extends BaseSpringSpec {
     @Configuration
     static class SecurityConfig extends WebSecurityConfigurerAdapter {
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER");
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/CsrfConfigurerTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/CsrfConfigurerTests.groovy
index 8ab6451bc4..5cadbf08c7 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/CsrfConfigurerTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/CsrfConfigurerTests.groovy
@@ -186,8 +186,7 @@ class CsrfConfigurerTests extends BaseSpringSpec {
                     .csrfTokenRepository(repo)
         }
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
@@ -342,8 +341,7 @@ class CsrfConfigurerTests extends BaseSpringSpec {
                     .csrfTokenRepository(repo)
         }
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerTests.groovy
index f4260bc41e..fc30331ff7 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerTests.groovy
@@ -99,8 +99,7 @@ class ExceptionHandlingConfigurerTests extends BaseSpringSpec {
     static class HttpBasicAndFormLoginEntryPointsConfig extends WebSecurityConfigurerAdapter {
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ExpressionUrlAuthorizationsTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ExpressionUrlAuthorizationsTests.groovy
index e709dfd522..4ee9225951 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ExpressionUrlAuthorizationsTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ExpressionUrlAuthorizationsTests.groovy
@@ -277,8 +277,7 @@ public class ExpressionUrlAuthorizationConfigurerTests extends BaseSpringSpec {
         }
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
@@ -374,8 +373,7 @@ public class ExpressionUrlAuthorizationConfigurerTests extends BaseSpringSpec {
         }
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
@@ -418,8 +416,7 @@ public class ExpressionUrlAuthorizationConfigurerTests extends BaseSpringSpec {
         }
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
@@ -451,8 +448,7 @@ public class ExpressionUrlAuthorizationConfigurerTests extends BaseSpringSpec {
         }
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
         }
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/HttpBasicConfigurerTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/HttpBasicConfigurerTests.groovy
index f7ab0ea6d1..8d6cb934b7 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/HttpBasicConfigurerTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/HttpBasicConfigurerTests.groovy
@@ -70,8 +70,7 @@ class HttpBasicConfigurerTests extends BaseSpringSpec {
         }
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
         }
@@ -99,8 +98,7 @@ class HttpBasicConfigurerTests extends BaseSpringSpec {
         }
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
         }
@@ -130,8 +128,7 @@ class HttpBasicConfigurerTests extends BaseSpringSpec {
         }
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
         }
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpInterceptUrlTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpInterceptUrlTests.groovy
index 51c7b4bbe4..35ee90f8ff 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpInterceptUrlTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpInterceptUrlTests.groovy
@@ -160,8 +160,7 @@ public class NamespaceHttpInterceptUrlTests extends BaseSpringSpec {
                     //    
                     .anyRequest().requiresInsecure()
         }
-        protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER").and()
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpPortMappingsTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpPortMappingsTests.groovy
index 37b1a8d7ab..b17e61d02f 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpPortMappingsTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpPortMappingsTests.groovy
@@ -99,8 +99,7 @@ public class NamespaceHttpPortMappingsTests extends BaseSpringSpec {
                     .anyRequest().requiresInsecure()
         }
 
-        protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER").and()
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpX509Tests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpX509Tests.groovy
index 0bcd29f109..aa6b62122d 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpX509Tests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpX509Tests.groovy
@@ -82,7 +82,7 @@ public class NamespaceHttpX509Tests extends BaseSpringSpec {
     @EnableWebSecurity
     public static class X509Config extends WebSecurityConfigurerAdapter {
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth.
                 inMemoryAuthentication()
                     .withUser("rod").password("password").roles("USER","ADMIN");
@@ -116,7 +116,7 @@ public class NamespaceHttpX509Tests extends BaseSpringSpec {
     public static class AuthenticationDetailsSourceRefConfig extends WebSecurityConfigurerAdapter {
         static AuthenticationDetailsSource AUTHENTICATION_DETAILS_SOURCE
 
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth.
                 inMemoryAuthentication()
                     .withUser("rod").password("password").roles("USER","ADMIN");
@@ -148,7 +148,7 @@ public class NamespaceHttpX509Tests extends BaseSpringSpec {
     @EnableWebSecurity
     public static class SubjectPrincipalRegexConfig extends WebSecurityConfigurerAdapter {
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth.
                 inMemoryAuthentication()
                     .withUser("rod").password("password").roles("USER","ADMIN");
@@ -181,7 +181,7 @@ public class NamespaceHttpX509Tests extends BaseSpringSpec {
     @EnableWebSecurity
     public static class UserDetailsServiceRefConfig extends WebSecurityConfigurerAdapter {
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth.
                 inMemoryAuthentication()
                     .withUser("rod").password("password").roles("USER","ADMIN");
@@ -215,7 +215,7 @@ public class NamespaceHttpX509Tests extends BaseSpringSpec {
     public static class AuthenticationUserDetailsServiceConfig extends WebSecurityConfigurerAdapter {
         static AuthenticationDetailsSource AUTHENTICATION_DETAILS_SOURCE
 
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth.
                 inMemoryAuthentication()
                     .withUser("rod").password("password").roles("USER","ADMIN");
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceRememberMeTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceRememberMeTests.groovy
index 0e64b0793b..1b260e99b0 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceRememberMeTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceRememberMeTests.groovy
@@ -303,8 +303,7 @@ public class NamespaceRememberMeTests extends BaseSpringSpec {
                 .rememberMe()
         }
 
-        protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                     .userDetailsService(USERDETAILS_SERVICE);
         }
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/PermitAllSupportTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/PermitAllSupportTests.groovy
index 03a13ef52b..76e6ef8b00 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/PermitAllSupportTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/PermitAllSupportTests.groovy
@@ -55,8 +55,7 @@ class PermitAllSupportTests extends BaseSpringSpec {
     static class NoAuthorizedUrlsConfig extends WebSecurityConfigurerAdapter {
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
         }
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurerTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurerTests.groovy
index ff491c29e4..11dcef4d0e 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurerTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurerTests.groovy
@@ -73,8 +73,7 @@ public class RememberMeConfigurerTests extends BaseSpringSpec {
         }
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             User user = new User("user", "password", AuthorityUtils.createAuthorityList("ROLE_USER"))
             DaoAuthenticationProvider provider = new DaoAuthenticationProvider()
             provider.userDetailsService = new InMemoryUserDetailsManager([user])
@@ -173,7 +172,7 @@ public class RememberMeConfigurerTests extends BaseSpringSpec {
         }
 
         @Autowired
-        public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) {
+        public void configureGlobal(AuthenticationManagerBuilder auth) {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER");
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/RequestCacheConfigurerTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/RequestCacheConfigurerTests.groovy
index cfbbc807da..1516fb929c 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/RequestCacheConfigurerTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/RequestCacheConfigurerTests.groovy
@@ -174,8 +174,7 @@ class RequestCacheConfigurerTests extends BaseSpringSpec {
         }
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ServletApiConfigurerTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ServletApiConfigurerTests.groovy
index 5a2d852b15..f481dc3394 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ServletApiConfigurerTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ServletApiConfigurerTests.groovy
@@ -70,8 +70,7 @@ class ServletApiConfigurerTests extends BaseSpringSpec {
     static class ServletApiConfig extends WebSecurityConfigurerAdapter {
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-            throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
@@ -102,8 +101,7 @@ class ServletApiConfigurerTests extends BaseSpringSpec {
         }
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-            throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerTests.groovy
index 545cb95cb7..20fe5b8234 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerTests.groovy
@@ -144,7 +144,7 @@ class SessionManagementConfigurerTests extends BaseSpringSpec {
                     .maximumSessions(1)
         }
         @Override
-        public void registerAuthentication(AuthenticationManagerBuilder auth) {
+        protected void configure(AuthenticationManagerBuilder auth) {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
@@ -188,7 +188,7 @@ class SessionManagementConfigurerTests extends BaseSpringSpec {
                         .maxSessionsPreventsLogin(true)
         }
         @Override
-        public void registerAuthentication(AuthenticationManagerBuilder auth) {
+        protected void configure(AuthenticationManagerBuilder auth) {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/openid/OpenIDLoginConfigurerTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/openid/OpenIDLoginConfigurerTests.groovy
index e7a66d4186..a9a7dee9b7 100644
--- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/openid/OpenIDLoginConfigurerTests.groovy
+++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/openid/OpenIDLoginConfigurerTests.groovy
@@ -67,8 +67,7 @@ class OpenIDLoginConfigurerTests extends BaseSpringSpec {
     static class InvokeTwiceDoesNotOverrideConfig extends WebSecurityConfigurerAdapter {
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
         }
diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerServlet31Tests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerServlet31Tests.java
index e090e914e7..8b45f9b4b6 100644
--- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerServlet31Tests.java
+++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerServlet31Tests.java
@@ -121,8 +121,7 @@ public class SessionManagementConfigurerServlet31Tests {
         }
 
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER");
diff --git a/docs/guides/src/asciidoc/hello-includes/secure-the-application.asc b/docs/guides/src/asciidoc/hello-includes/secure-the-application.asc
index 21d515af11..f7d6c0f5cf 100644
--- a/docs/guides/src/asciidoc/hello-includes/secure-the-application.asc
+++ b/docs/guides/src/asciidoc/hello-includes/secure-the-application.asc
@@ -74,7 +74,7 @@ import org.springframework.security.config.annotation.web.configuration.*;
 public class SecurityConfig extends WebSecurityConfigurerAdapter {
 
     @Autowired
-    public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
         auth
             .inMemoryAuthentication()
                 .withUser("user").password("password").roles("USER");
diff --git a/docs/manual/src/asciidoctor/index.adoc b/docs/manual/src/asciidoctor/index.adoc
index e667c416e0..6ffe227717 100644
--- a/docs/manual/src/asciidoctor/index.adoc
+++ b/docs/manual/src/asciidoctor/index.adoc
@@ -290,7 +290,7 @@ import org.springframework.security.config.annotation.web.configuration.*;
 public class SecurityConfig extends WebSecurityConfigurerAdapter {
 
     @Autowired
-    public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
         auth
             .inMemoryAuthentication()
                 .withUser("user").password("password").roles("USER");
@@ -517,7 +517,7 @@ We have already seen an example of configuring in memory authentication for a si
 [source,java]
 ----
 @Autowired
-public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
     auth
         .inMemoryAuthentication()
             .withUser("user").password("password").roles("USER").and()
@@ -535,7 +535,7 @@ You can find the updates to suppport JDBC based authentication. The example belo
 private DataSource dataSource;
 
 @Autowired
-public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
     auth
         .jdbcAuthentication()
             .dataSource(dataSource)
@@ -555,7 +555,7 @@ You can find the updates to suppport LDAP based authentication. The https://gith
 private DataSource dataSource;
 
 @Autowired
-public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
     auth
         .ldapAuthentication()
             .userDnPatterns("uid={0},ou=people")
diff --git a/samples/helloworld-jc/src/main/java/org/springframework/security/samples/config/SecurityConfig.java b/samples/helloworld-jc/src/main/java/org/springframework/security/samples/config/SecurityConfig.java
index 3881db1819..e3a0dc74ba 100644
--- a/samples/helloworld-jc/src/main/java/org/springframework/security/samples/config/SecurityConfig.java
+++ b/samples/helloworld-jc/src/main/java/org/springframework/security/samples/config/SecurityConfig.java
@@ -10,7 +10,7 @@ import org.springframework.security.config.annotation.web.configuration.*;
 public class SecurityConfig extends WebSecurityConfigurerAdapter {
 
     @Autowired
-    public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
         auth
             .inMemoryAuthentication()
                 .withUser("user").password("password").roles("USER");
diff --git a/samples/jdbc-jc/src/main/java/org/springframework/security/samples/config/SecurityConfig.java b/samples/jdbc-jc/src/main/java/org/springframework/security/samples/config/SecurityConfig.java
index e3d6869b13..74a11ecf4a 100644
--- a/samples/jdbc-jc/src/main/java/org/springframework/security/samples/config/SecurityConfig.java
+++ b/samples/jdbc-jc/src/main/java/org/springframework/security/samples/config/SecurityConfig.java
@@ -17,7 +17,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
     private DataSource dataSource;
 
     @Autowired
-    public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
         auth
             .jdbcAuthentication()
                 .dataSource(dataSource)
diff --git a/samples/x509-jc/src/main/java/org/springframework/security/samples/config/SecurityConfig.java b/samples/x509-jc/src/main/java/org/springframework/security/samples/config/SecurityConfig.java
index 2277415836..3203a29489 100644
--- a/samples/x509-jc/src/main/java/org/springframework/security/samples/config/SecurityConfig.java
+++ b/samples/x509-jc/src/main/java/org/springframework/security/samples/config/SecurityConfig.java
@@ -12,7 +12,7 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
 public class SecurityConfig extends WebSecurityConfigurerAdapter {
 
     @Autowired
-    public void registerGlobalAuthentication(AuthenticationManagerBuilder auth)
+    public void configureGlobal(AuthenticationManagerBuilder auth)
             throws Exception {
         auth.
             inMemoryAuthentication()