Jelajahi Sumber

SEC-2365: registerAuthentication->configure

Rob Winch 12 tahun lalu
induk
melakukan
348e3a22b6
42 mengubah file dengan 109 tambahan dan 165 penghapusan
  1. 5 18
      config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/LdapAuthenticationProviderBuilderSecurityBuilderTests.groovy
  2. 3 6
      config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/NamespaceLdapAuthenticationProviderTestsConfigs.java
  3. 5 5
      config/src/main/java/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfiguration.java
  4. 17 17
      config/src/main/java/org/springframework/security/config/annotation/web/builders/HttpSecurity.java
  5. 1 1
      config/src/main/java/org/springframework/security/config/annotation/web/configuration/EnableWebSecurity.java
  6. 6 6
      config/src/main/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfigurerAdapter.java
  7. 1 1
      config/src/main/java/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurer.java
  8. 1 1
      config/src/main/java/org/springframework/security/config/annotation/web/configurers/openid/OpenIDLoginConfigurer.java
  9. 2 2
      config/src/test/groovy/org/springframework/security/config/annotation/authentication/AuthenticationManagerBuilderTests.groovy
  10. 1 2
      config/src/test/groovy/org/springframework/security/config/annotation/authentication/BaseAuthenticationConfig.groovy
  11. 2 2
      config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationManagerTests.groovy
  12. 2 2
      config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationProviderTests.groovy
  13. 3 3
      config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceJdbcUserServiceTests.groovy
  14. 3 6
      config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespacePasswordEncoderTests.groovy
  15. 2 4
      config/src/test/groovy/org/springframework/security/config/annotation/authentication/PasswordEncoderConfigurerConfigs.java
  16. 6 12
      config/src/test/groovy/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfigurationTests.groovy
  17. 2 3
      config/src/test/groovy/org/springframework/security/config/annotation/method/configuration/SampleEnableGlobalMethodSecurityTests.groovy
  18. 3 3
      config/src/test/groovy/org/springframework/security/config/annotation/web/SampleWebSecurityConfigurerAdapterTests.groovy
  19. 5 9
      config/src/test/groovy/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterTests.groovy
  20. 1 2
      config/src/test/groovy/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterTestsConfigs.java
  21. 1 2
      config/src/test/groovy/org/springframework/security/config/annotation/web/configuration/BaseWebConfig.groovy
  22. 1 2
      config/src/test/groovy/org/springframework/security/config/annotation/web/configuration/EnableWebSecurityTests.groovy
  23. 2 4
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/CsrfConfigurerTests.groovy
  24. 1 2
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerTests.groovy
  25. 4 8
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ExpressionUrlAuthorizationsTests.groovy
  26. 3 6
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/HttpBasicConfigurerTests.groovy
  27. 1 2
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpInterceptUrlTests.groovy
  28. 1 2
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpPortMappingsTests.groovy
  29. 5 5
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpX509Tests.groovy
  30. 1 2
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceRememberMeTests.groovy
  31. 1 2
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/PermitAllSupportTests.groovy
  32. 2 3
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurerTests.groovy
  33. 1 2
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/RequestCacheConfigurerTests.groovy
  34. 2 4
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ServletApiConfigurerTests.groovy
  35. 2 2
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerTests.groovy
  36. 1 2
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/openid/OpenIDLoginConfigurerTests.groovy
  37. 1 2
      config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerServlet31Tests.java
  38. 1 1
      docs/guides/src/asciidoc/hello-includes/secure-the-application.asc
  39. 4 4
      docs/manual/src/asciidoctor/index.adoc
  40. 1 1
      samples/helloworld-jc/src/main/java/org/springframework/security/samples/config/SecurityConfig.java
  41. 1 1
      samples/jdbc-jc/src/main/java/org/springframework/security/samples/config/SecurityConfig.java
  42. 1 1
      samples/x509-jc/src/main/java/org/springframework/security/samples/config/SecurityConfig.java

+ 5 - 18
config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/LdapAuthenticationProviderBuilderSecurityBuilderTests.groovy

@@ -53,8 +53,7 @@ class LdapAuthenticationProviderBuilderSecurityBuilderTests extends BaseSpringSp
 
 
     @Configuration
     @Configuration
     static class DefaultLdapConfig extends BaseLdapProviderConfig {
     static class DefaultLdapConfig extends BaseLdapProviderConfig {
-        protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .ldapAuthentication()
                 .ldapAuthentication()
                     .contextSource(contextSource())
                     .contextSource(contextSource())
@@ -71,7 +70,7 @@ class LdapAuthenticationProviderBuilderSecurityBuilderTests extends BaseSpringSp
 
 
     @Configuration
     @Configuration
     static class GroupRolesConfig extends BaseLdapProviderConfig {
     static class GroupRolesConfig extends BaseLdapProviderConfig {
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .ldapAuthentication()
                 .ldapAuthentication()
                     .contextSource(contextSource())
                     .contextSource(contextSource())
@@ -89,8 +88,7 @@ class LdapAuthenticationProviderBuilderSecurityBuilderTests extends BaseSpringSp
 
 
     @Configuration
     @Configuration
     static class GroupSearchConfig extends BaseLdapProviderConfig {
     static class GroupSearchConfig extends BaseLdapProviderConfig {
-        protected void registerAuthentication(
-            AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .ldapAuthentication()
                 .ldapAuthentication()
                     .contextSource(contextSource())
                     .contextSource(contextSource())
@@ -108,8 +106,7 @@ class LdapAuthenticationProviderBuilderSecurityBuilderTests extends BaseSpringSp
 
 
     @Configuration
     @Configuration
     static class RolePrefixConfig extends BaseLdapProviderConfig {
     static class RolePrefixConfig extends BaseLdapProviderConfig {
-        protected void registerAuthentication(
-            AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .ldapAuthentication()
                 .ldapAuthentication()
                     .contextSource(contextSource())
                     .contextSource(contextSource())
@@ -128,8 +125,7 @@ class LdapAuthenticationProviderBuilderSecurityBuilderTests extends BaseSpringSp
 
 
     @Configuration
     @Configuration
     static class BindAuthenticationConfig extends BaseLdapServerConfig {
     static class BindAuthenticationConfig extends BaseLdapServerConfig {
-        protected void registerAuthentication(
-            AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .ldapAuthentication()
                 .ldapAuthentication()
                     .contextSource(contextSource())
                     .contextSource(contextSource())
@@ -154,15 +150,6 @@ class LdapAuthenticationProviderBuilderSecurityBuilderTests extends BaseSpringSp
 
 
     @Configuration
     @Configuration
     static abstract class BaseLdapProviderConfig {
     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
         @Bean
         public BaseLdapPathContextSource contextSource() throws Exception {
         public BaseLdapPathContextSource contextSource() throws Exception {

+ 3 - 6
config/src/integration-test/java/org/springframework/security/config/annotation/authentication/ldap/NamespaceLdapAuthenticationProviderTestsConfigs.java

@@ -31,8 +31,7 @@ public class NamespaceLdapAuthenticationProviderTestsConfigs {
     @Configuration
     @Configuration
     @EnableWebSecurity
     @EnableWebSecurity
     static class LdapAuthenticationProviderConfig extends WebSecurityConfigurerAdapter {
     static class LdapAuthenticationProviderConfig extends WebSecurityConfigurerAdapter {
-        protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .ldapAuthentication()
                 .ldapAuthentication()
                     .groupSearchBase("ou=groups")
                     .groupSearchBase("ou=groups")
@@ -43,8 +42,7 @@ public class NamespaceLdapAuthenticationProviderTestsConfigs {
     @Configuration
     @Configuration
     @EnableWebSecurity
     @EnableWebSecurity
     static class CustomLdapAuthenticationProviderConfig extends WebSecurityConfigurerAdapter {
     static class CustomLdapAuthenticationProviderConfig extends WebSecurityConfigurerAdapter {
-        protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .ldapAuthentication()
                 .ldapAuthentication()
                     .groupRoleAttribute("cn") // ldap-authentication-provider@group-role-attribute
                     .groupRoleAttribute("cn") // ldap-authentication-provider@group-role-attribute
@@ -70,8 +68,7 @@ public class NamespaceLdapAuthenticationProviderTestsConfigs {
     @Configuration
     @Configuration
     @EnableWebSecurity
     @EnableWebSecurity
     static class PasswordCompareLdapConfig extends WebSecurityConfigurerAdapter {
     static class PasswordCompareLdapConfig extends WebSecurityConfigurerAdapter {
-        protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .ldapAuthentication()
                 .ldapAuthentication()
                     .groupSearchBase("ou=groups")
                     .groupSearchBase("ou=groups")

+ 5 - 5
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
      * 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.
      * is attempted to be autowired by type.
      *
      *
      * @return
      * @return
@@ -247,7 +247,7 @@ public class GlobalMethodSecurityConfiguration implements ImportAware {
             DefaultAuthenticationEventPublisher eventPublisher = objectPostProcessor.postProcess(new DefaultAuthenticationEventPublisher());
             DefaultAuthenticationEventPublisher eventPublisher = objectPostProcessor.postProcess(new DefaultAuthenticationEventPublisher());
             auth.authenticationEventPublisher(eventPublisher);
             auth.authenticationEventPublisher(eventPublisher);
             auth.objectPostProcessor(objectPostProcessor);
             auth.objectPostProcessor(objectPostProcessor);
-            registerAuthentication(auth);
+            configure(auth);
             if(!disableAuthenticationRegistry) {
             if(!disableAuthenticationRegistry) {
                 authenticationManager = auth.build();
                 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,
      * 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
      * @param auth the {@link AuthenticationManagerBuilder} used to register different authentication mechanisms for the
      *                 global method security.
      *                 global method security.
      * @throws Exception
      * @throws Exception
      */
      */
-    protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
         this.disableAuthenticationRegistry = true;
         this.disableAuthenticationRegistry = true;
     }
     }
 
 

+ 17 - 17
config/src/main/java/org/springframework/security/config/annotation/web/builders/HttpSecurity.java

@@ -98,7 +98,7 @@ import org.springframework.util.Assert;
  *     }
  *     }
  *
  *
  *     @Override
  *     @Override
- *     protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+ *     protected void configure(AuthenticationManagerBuilder auth) throws Exception {
  *         auth
  *         auth
  *              .inMemoryAuthentication()
  *              .inMemoryAuthentication()
  *                   .withUser("user")
  *                   .withUser("user")
@@ -157,7 +157,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
      *     }
      *     }
      *
      *
      *     &#064;Override
      *     &#064;Override
-     *     protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+     *     protected void configure(AuthenticationManagerBuilder auth) throws Exception {
      *         auth
      *         auth
      *                 .inMemoryAuthentication()
      *                 .inMemoryAuthentication()
      *                     // the username must match the OpenID of the user you are
      *                     // the username must match the OpenID of the user you are
@@ -345,7 +345,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
      *     }
      *     }
      *
      *
      *     &#064;Override
      *     &#064;Override
-     *     protected void registerAuthentication(AuthenticationManagerBuilder auth)
+     *     protected void configure(AuthenticationManagerBuilder auth)
      *             throws Exception {
      *             throws Exception {
      *         auth.
      *         auth.
      *             inMemoryAuthentication()
      *             inMemoryAuthentication()
@@ -417,7 +417,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
      *     }
      *     }
      *
      *
      *     &#064;Override
      *     &#064;Override
-     *     protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+     *     protected void configure(AuthenticationManagerBuilder auth) throws Exception {
      *         auth
      *         auth
      *             .inMemoryAuthentication()
      *             .inMemoryAuthentication()
      *                 .withUser(&quot;user&quot;)
      *                 .withUser(&quot;user&quot;)
@@ -559,7 +559,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
      * public class RememberMeSecurityConfig extends WebSecurityConfigurerAdapter {
      * public class RememberMeSecurityConfig extends WebSecurityConfigurerAdapter {
      *
      *
      *     &#064;Override
      *     &#064;Override
-     *     protected void registerAuthentication(AuthenticationManagerBuilder auth)
+     *     protected void configure(AuthenticationManagerBuilder auth)
      *             throws Exception {
      *             throws Exception {
      *         auth
      *         auth
      *              .inMemoryAuthentication()
      *              .inMemoryAuthentication()
@@ -615,7 +615,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
      *     }
      *     }
      *
      *
      *     &#064;Override
      *     &#064;Override
-     *     protected void registerAuthentication(AuthenticationManagerBuilder auth)
+     *     protected void configure(AuthenticationManagerBuilder auth)
      *             throws Exception {
      *             throws Exception {
      *         auth
      *         auth
      *              .inMemoryAuthentication()
      *              .inMemoryAuthentication()
@@ -650,7 +650,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
      *     }
      *     }
      *
      *
      *     &#064;Override
      *     &#064;Override
-     *     protected void registerAuthentication(AuthenticationManagerBuilder auth)
+     *     protected void configure(AuthenticationManagerBuilder auth)
      *             throws Exception {
      *             throws Exception {
      *         auth
      *         auth
      *              .inMemoryAuthentication()
      *              .inMemoryAuthentication()
@@ -797,7 +797,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
      *     }
      *     }
      *
      *
      *     &#064;Override
      *     &#064;Override
-     *     protected void registerAuthentication(AuthenticationManagerBuilder auth)
+     *     protected void configure(AuthenticationManagerBuilder auth)
      *             throws Exception {
      *             throws Exception {
      *         auth
      *         auth
      *              .inMemoryAuthentication()
      *              .inMemoryAuthentication()
@@ -845,7 +845,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
      *     }
      *     }
      *
      *
      *     &#064;Override
      *     &#064;Override
-     *     protected void registerAuthentication(AuthenticationManagerBuilder auth)
+     *     protected void configure(AuthenticationManagerBuilder auth)
      *             throws Exception {
      *             throws Exception {
      *         auth
      *         auth
      *              .inMemoryAuthentication()
      *              .inMemoryAuthentication()
@@ -878,7 +878,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
      *     }
      *     }
      *
      *
      *     &#064;Override
      *     &#064;Override
-     *     protected void registerAuthentication(AuthenticationManagerBuilder auth)
+     *     protected void configure(AuthenticationManagerBuilder auth)
      *             throws Exception {
      *             throws Exception {
      *         auth
      *         auth
      *              .inMemoryAuthentication()
      *              .inMemoryAuthentication()
@@ -923,7 +923,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
      *     }
      *     }
      *
      *
      *     &#064;Override
      *     &#064;Override
-     *     protected void registerAuthentication(AuthenticationManagerBuilder auth)
+     *     protected void configure(AuthenticationManagerBuilder auth)
      *             throws Exception {
      *             throws Exception {
      *         auth
      *         auth
      *              .inMemoryAuthentication()
      *              .inMemoryAuthentication()
@@ -956,7 +956,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
      *     }
      *     }
      *
      *
      *     &#064;Override
      *     &#064;Override
-     *     protected void registerAuthentication(AuthenticationManagerBuilder auth)
+     *     protected void configure(AuthenticationManagerBuilder auth)
      *             throws Exception {
      *             throws Exception {
      *         auth
      *         auth
      *              .inMemoryAuthentication()
      *              .inMemoryAuthentication()
@@ -1005,7 +1005,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
      *     }
      *     }
      *
      *
      *     &#064;Override
      *     &#064;Override
-     *     protected void registerAuthentication(AuthenticationManagerBuilder auth)
+     *     protected void configure(AuthenticationManagerBuilder auth)
      *             throws Exception {
      *             throws Exception {
      *         auth
      *         auth
      *              .inMemoryAuthentication()
      *              .inMemoryAuthentication()
@@ -1048,7 +1048,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
      *     }
      *     }
      *
      *
      *     &#064;Override
      *     &#064;Override
-     *     protected void registerAuthentication(AuthenticationManagerBuilder auth)
+     *     protected void configure(AuthenticationManagerBuilder auth)
      *             throws Exception {
      *             throws Exception {
      *         auth
      *         auth
      *             .inMemoryAuthentication()
      *             .inMemoryAuthentication()
@@ -1163,7 +1163,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
      *     }
      *     }
      *
      *
      *     &#064;Override
      *     &#064;Override
-     *     protected void registerAuthentication(AuthenticationManagerBuilder auth)
+     *     protected void configure(AuthenticationManagerBuilder auth)
      *             throws Exception {
      *             throws Exception {
      *         auth
      *         auth
      *             .inMemoryAuthentication()
      *             .inMemoryAuthentication()
@@ -1194,7 +1194,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
      *     }
      *     }
      *
      *
      *     &#064;Override
      *     &#064;Override
-     *     protected void registerAuthentication(AuthenticationManagerBuilder auth)
+     *     protected void configure(AuthenticationManagerBuilder auth)
      *             throws Exception {
      *             throws Exception {
      *         auth
      *         auth
      *             .inMemoryAuthentication()
      *             .inMemoryAuthentication()
@@ -1227,7 +1227,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
      *     }
      *     }
      *
      *
      *     &#064;Override
      *     &#064;Override
-     *     protected void registerAuthentication(AuthenticationManagerBuilder auth)
+     *     protected void configure(AuthenticationManagerBuilder auth)
      *             throws Exception {
      *             throws Exception {
      *         auth
      *         auth
      *             .inMemoryAuthentication()
      *             .inMemoryAuthentication()

+ 1 - 1
config/src/main/java/org/springframework/security/config/annotation/web/configuration/EnableWebSecurity.java

@@ -56,7 +56,7 @@ import org.springframework.security.config.annotation.web.WebSecurityConfigurer;
  *    }
  *    }
  *
  *
  *    &#064;Override
  *    &#064;Override
- *    protected void registerAuthentication(AuthenticationManagerBuilder auth) {
+ *    protected void configure(AuthenticationManagerBuilder auth) {
  *        auth
  *        auth
  *            // enable in memory based authentication with a user named "user" and "admin"
  *            // enable in memory based authentication with a user named "user" and "admin"
  *            .inMemoryAuthentication()
  *            .inMemoryAuthentication()

+ 6 - 6
config/src/main/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfigurerAdapter.java

@@ -131,7 +131,7 @@ public abstract class WebSecurityConfigurerAdapter implements SecurityConfigurer
      *
      *
      * <pre>
      * <pre>
      * &#064;Override
      * &#064;Override
-     * protected void registerAuthentication(AuthenticationManagerBuilder auth) {
+     * protected void configure(AuthenticationManagerBuilder auth) {
      *     auth
      *     auth
      *         // enable in memory based authentication with a user named
      *         // enable in memory based authentication with a user named
      *         // &quot;user&quot; and &quot;admin&quot;
      *         // &quot;user&quot; and &quot;admin&quot;
@@ -153,7 +153,7 @@ public abstract class WebSecurityConfigurerAdapter implements SecurityConfigurer
      *            the {@link AuthenticationManagerBuilder} to use
      *            the {@link AuthenticationManagerBuilder} to use
      * @throws Exception
      * @throws Exception
      */
      */
-    protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
         this.disableAuthenticationRegistration = true;
         this.disableAuthenticationRegistration = true;
     }
     }
 
 
@@ -201,7 +201,7 @@ public abstract class WebSecurityConfigurerAdapter implements SecurityConfigurer
 
 
     /**
     /**
      * Override this method to expose the {@link AuthenticationManager} from
      * 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:
      * a Bean. For example:
      *
      *
      * <pre>
      * <pre>
@@ -221,7 +221,7 @@ public abstract class WebSecurityConfigurerAdapter implements SecurityConfigurer
 
 
     /**
     /**
      * Gets the {@link AuthenticationManager} to use. The default strategy is if
      * 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.
      * overridden to use the {@link AuthenticationManagerBuilder} that was passed in.
      * Otherwise, autowire the {@link AuthenticationManager} by type.
      * Otherwise, autowire the {@link AuthenticationManager} by type.
      *
      *
@@ -230,7 +230,7 @@ public abstract class WebSecurityConfigurerAdapter implements SecurityConfigurer
      */
      */
     protected AuthenticationManager authenticationManager() throws Exception {
     protected AuthenticationManager authenticationManager() throws Exception {
         if(!authenticationManagerInitialized) {
         if(!authenticationManagerInitialized) {
-            registerAuthentication(parentAuthenticationBuilder);
+            configure(parentAuthenticationBuilder);
             if(disableAuthenticationRegistration) {
             if(disableAuthenticationRegistration) {
                 try {
                 try {
                     authenticationManager = context.getBean(AuthenticationManagerBuilder.class).getOrBuild();
                     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
      * 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:
      * general only the following override should be done of this method:
      *
      *
      * <pre>
      * <pre>

+ 1 - 1
config/src/main/java/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurer.java

@@ -124,7 +124,7 @@ public final class RememberMeConfigurer<H extends HttpSecurityBuilder<H>> extend
      * {@link UserDetails} when a remember me token is valid. The default is to
      * {@link UserDetails} when a remember me token is valid. The default is to
      * use the {@link UserDetailsService} found by invoking
      * use the {@link UserDetailsService} found by invoking
      * {@link HttpSecurity#getSharedObject(Class)} which is set when using
      * {@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)}.
      * Alternatively, one can populate {@link #rememberMeServices(RememberMeServices)}.
      *
      *
      * @param userDetailsService
      * @param userDetailsService

+ 1 - 1
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;
  * 	}
  * 	}
  *
  *
  * 	&#064;Override
  * 	&#064;Override
- * 	protected void registerAuthentication(
+ * 	protected void configure(AuthenticationManagerBuilder auth)(
  * 			AuthenticationManagerBuilder auth) throws Exception {
  * 			AuthenticationManagerBuilder auth) throws Exception {
  * 		auth
  * 		auth
  * 			.inMemoryAuthentication()
  * 			.inMemoryAuthentication()

+ 2 - 2
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
     // 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:
         setup:
             AuthenticationEventPublisher aep = Mock()
             AuthenticationEventPublisher aep = Mock()
         when:
         when:
@@ -78,7 +78,7 @@ class AuthenticationManagerBuilderTests extends BaseSpringSpec {
     @EnableWebSecurity
     @EnableWebSecurity
     @Configuration
     @Configuration
     static class MultiAuthenticationProvidersConfig extends WebSecurityConfigurerAdapter {
     static class MultiAuthenticationProvidersConfig extends WebSecurityConfigurerAdapter {
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER").and()
                     .withUser("user").password("password").roles("USER").and()

+ 1 - 2
config/src/test/groovy/org/springframework/security/config/annotation/authentication/BaseAuthenticationConfig.groovy

@@ -35,8 +35,7 @@ import org.springframework.security.core.userdetails.UserDetailsService;
 @Configuration
 @Configuration
 class BaseAuthenticationConfig {
 class BaseAuthenticationConfig {
     @Autowired
     @Autowired
-    protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
         auth
         auth
             .inMemoryAuthentication()
             .inMemoryAuthentication()
                 .withUser("user").password("password").roles("USER").and()
                 .withUser("user").password("password").roles("USER").and()

+ 2 - 2
config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationManagerTests.groovy

@@ -47,7 +47,7 @@ class NamespaceAuthenticationManagerTests extends BaseSpringSpec {
     @EnableWebSecurity
     @EnableWebSecurity
     @Configuration
     @Configuration
     static class EraseCredentialsTrueDefaultConfig extends WebSecurityConfigurerAdapter {
     static class EraseCredentialsTrueDefaultConfig extends WebSecurityConfigurerAdapter {
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
                     .withUser("user").password("password").roles("USER")
@@ -74,7 +74,7 @@ class NamespaceAuthenticationManagerTests extends BaseSpringSpec {
     @EnableWebSecurity
     @EnableWebSecurity
     @Configuration
     @Configuration
     static class EraseCredentialsFalseConfig extends WebSecurityConfigurerAdapter {
     static class EraseCredentialsFalseConfig extends WebSecurityConfigurerAdapter {
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .eraseCredentials(false)
                 .eraseCredentials(false)
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()

+ 2 - 2
config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceAuthenticationProviderTests.groovy

@@ -42,7 +42,7 @@ class NamespaceAuthenticationProviderTests extends BaseSpringSpec {
     @Configuration
     @Configuration
     static class AuthenticationProviderRefConfig extends WebSecurityConfigurerAdapter {
     static class AuthenticationProviderRefConfig extends WebSecurityConfigurerAdapter {
         static DaoAuthenticationProvider expected = new DaoAuthenticationProvider()
         static DaoAuthenticationProvider expected = new DaoAuthenticationProvider()
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .authenticationProvider(expected)
                 .authenticationProvider(expected)
         }
         }
@@ -67,7 +67,7 @@ class NamespaceAuthenticationProviderTests extends BaseSpringSpec {
     @Configuration
     @Configuration
     static class UserServiceRefConfig extends WebSecurityConfigurerAdapter {
     static class UserServiceRefConfig extends WebSecurityConfigurerAdapter {
         static InMemoryUserDetailsManager expected = new InMemoryUserDetailsManager([] as Collection)
         static InMemoryUserDetailsManager expected = new InMemoryUserDetailsManager([] as Collection)
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .userDetailsService(expected)
                 .userDetailsService(expected)
         }
         }

+ 3 - 3
config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespaceJdbcUserServiceTests.groovy

@@ -54,7 +54,7 @@ class NamespaceJdbcUserServiceTests extends BaseSpringSpec {
         @Autowired
         @Autowired
         private DataSource dataSource;
         private DataSource dataSource;
 
 
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .jdbcAuthentication()
                 .jdbcAuthentication()
                     .dataSource(dataSource) // jdbc-user-service@data-source-ref
                     .dataSource(dataSource) // jdbc-user-service@data-source-ref
@@ -84,7 +84,7 @@ class NamespaceJdbcUserServiceTests extends BaseSpringSpec {
         @Autowired
         @Autowired
         private DataSource dataSource;
         private DataSource dataSource;
 
 
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .jdbcAuthentication()
                 .jdbcAuthentication()
                     .dataSource(dataSource)
                     .dataSource(dataSource)
@@ -132,7 +132,7 @@ class NamespaceJdbcUserServiceTests extends BaseSpringSpec {
         @Autowired
         @Autowired
         private DataSource dataSource;
         private DataSource dataSource;
 
 
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .jdbcAuthentication()
                 .jdbcAuthentication()
                     // jdbc-user-service@dataSource
                     // jdbc-user-service@dataSource

+ 3 - 6
config/src/test/groovy/org/springframework/security/config/annotation/authentication/NamespacePasswordEncoderTests.groovy

@@ -54,8 +54,7 @@ class NamespacePasswordEncoderTests extends BaseSpringSpec {
     @Configuration
     @Configuration
     static class PasswordEncoderWithInMemoryConfig extends WebSecurityConfigurerAdapter {
     static class PasswordEncoderWithInMemoryConfig extends WebSecurityConfigurerAdapter {
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
 
 
             BCryptPasswordEncoder encoder = new BCryptPasswordEncoder()
             BCryptPasswordEncoder encoder = new BCryptPasswordEncoder()
             auth
             auth
@@ -76,8 +75,7 @@ class NamespacePasswordEncoderTests extends BaseSpringSpec {
     @Configuration
     @Configuration
     static class PasswordEncoderWithJdbcConfig extends WebSecurityConfigurerAdapter {
     static class PasswordEncoderWithJdbcConfig extends WebSecurityConfigurerAdapter {
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
 
 
             BCryptPasswordEncoder encoder = new BCryptPasswordEncoder()
             BCryptPasswordEncoder encoder = new BCryptPasswordEncoder()
             auth
             auth
@@ -106,8 +104,7 @@ class NamespacePasswordEncoderTests extends BaseSpringSpec {
     @Configuration
     @Configuration
     static class PasswordEncoderWithUserDetailsServiceConfig extends WebSecurityConfigurerAdapter {
     static class PasswordEncoderWithUserDetailsServiceConfig extends WebSecurityConfigurerAdapter {
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
 
 
             BCryptPasswordEncoder encoder = new BCryptPasswordEncoder()
             BCryptPasswordEncoder encoder = new BCryptPasswordEncoder()
             User user = new User("user",encoder.encode("password"), AuthorityUtils.createAuthorityList("ROLE_USER"))
             User user = new User("user",encoder.encode("password"), AuthorityUtils.createAuthorityList("ROLE_USER"))

+ 2 - 4
config/src/test/groovy/org/springframework/security/config/annotation/authentication/PasswordEncoderConfigurerConfigs.java

@@ -37,8 +37,7 @@ public class PasswordEncoderConfigurerConfigs {
     @EnableWebSecurity
     @EnableWebSecurity
     @Configuration
     @Configuration
     static class PasswordEncoderConfig extends WebSecurityConfigurerAdapter {
     static class PasswordEncoderConfig extends WebSecurityConfigurerAdapter {
-        protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             BCryptPasswordEncoder encoder = passwordEncoder();
             BCryptPasswordEncoder encoder = passwordEncoder();
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
@@ -66,8 +65,7 @@ public class PasswordEncoderConfigurerConfigs {
     @EnableWebSecurity
     @EnableWebSecurity
     @Configuration
     @Configuration
     static class PasswordEncoderNoAuthManagerLoadsConfig extends WebSecurityConfigurerAdapter {
     static class PasswordEncoderNoAuthManagerLoadsConfig extends WebSecurityConfigurerAdapter {
-        protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             BCryptPasswordEncoder encoder = passwordEncoder();
             BCryptPasswordEncoder encoder = passwordEncoder();
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()

+ 6 - 12
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
         static AuthenticationSuccessEvent EVENT
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
         }
         }
@@ -101,8 +100,7 @@ public class GlobalMethodSecurityConfigurationTests extends BaseSpringSpec {
         static AuthenticationTrustResolver TR
         static AuthenticationTrustResolver TR
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
         }
         }
@@ -135,8 +133,7 @@ public class GlobalMethodSecurityConfigurationTests extends BaseSpringSpec {
     static class ExpressionHandlerHasBeanResolverSetConfig extends GlobalMethodSecurityConfiguration {
     static class ExpressionHandlerHasBeanResolverSetConfig extends GlobalMethodSecurityConfiguration {
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
         }
         }
@@ -188,8 +185,7 @@ public class GlobalMethodSecurityConfigurationTests extends BaseSpringSpec {
     static class MethodSecurityServiceConfig extends GlobalMethodSecurityConfiguration {
     static class MethodSecurityServiceConfig extends GlobalMethodSecurityConfiguration {
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
         }
         }
@@ -225,8 +221,7 @@ public class GlobalMethodSecurityConfigurationTests extends BaseSpringSpec {
         static PermissionEvaluator PE
         static PermissionEvaluator PE
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
         }
         }
@@ -255,8 +250,7 @@ public class GlobalMethodSecurityConfigurationTests extends BaseSpringSpec {
         static PermissionEvaluator PE
         static PermissionEvaluator PE
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
         }
         }

+ 2 - 3
config/src/test/groovy/org/springframework/security/config/annotation/method/configuration/SampleEnableGlobalMethodSecurityTests.groovy

@@ -67,7 +67,7 @@ public class SampleEnableGlobalMethodSecurityTests extends BaseSpringSpec {
         }
         }
 
 
         @Autowired
         @Autowired
-        public void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER").and()
                     .withUser("user").password("password").roles("USER").and()
@@ -104,8 +104,7 @@ public class SampleEnableGlobalMethodSecurityTests extends BaseSpringSpec {
         }
         }
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-            throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                 .withUser("user").password("password").roles("USER").and()
                 .withUser("user").password("password").roles("USER").and()

+ 3 - 3
config/src/test/groovy/org/springframework/security/config/annotation/web/SampleWebSecurityConfigurerAdapterTests.groovy

@@ -91,7 +91,7 @@ public class SampleWebSecurityConfigurerAdapterTests extends BaseSpringSpec {
     @EnableWebSecurity
     @EnableWebSecurity
     public static class HelloWorldWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {
     public static class HelloWorldWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) {
+        protected void configure(AuthenticationManagerBuilder auth) {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER");
                     .withUser("user").password("password").roles("USER");
@@ -179,7 +179,7 @@ public class SampleWebSecurityConfigurerAdapterTests extends BaseSpringSpec {
         }
         }
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) {
+        protected void configure(AuthenticationManagerBuilder auth) {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER").and()
                     .withUser("user").password("password").roles("USER").and()
@@ -276,7 +276,7 @@ public class SampleWebSecurityConfigurerAdapterTests extends BaseSpringSpec {
     @EnableWebSecurity
     @EnableWebSecurity
     public static class SampleMultiHttpSecurityConfig {
     public static class SampleMultiHttpSecurityConfig {
         @Autowired
         @Autowired
-        public void registerAuthentication(AuthenticationManagerBuilder auth) {
+        protected void configure(AuthenticationManagerBuilder auth) {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER").and()
                     .withUser("user").password("password").roles("USER").and()

+ 5 - 9
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 {
     static class HeadersArePopulatedByDefaultConfig extends WebSecurityConfigurerAdapter {
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
                     .withUser("user").password("password").roles("USER")
@@ -114,8 +113,7 @@ class WebSecurityConfigurerAdapterTests extends BaseSpringSpec {
     static class WebAsyncPopulatedByDefaultConfig extends WebSecurityConfigurerAdapter {
     static class WebAsyncPopulatedByDefaultConfig extends WebSecurityConfigurerAdapter {
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
                     .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:
         when:
             loadConfig(InMemoryAuthWithWebSecurityConfigurerAdapter)
             loadConfig(InMemoryAuthWithWebSecurityConfigurerAdapter)
         then:
         then:
@@ -152,8 +150,7 @@ class WebSecurityConfigurerAdapterTests extends BaseSpringSpec {
         }
         }
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
                     .withUser("user").password("password").roles("USER")
@@ -236,8 +233,7 @@ class WebSecurityConfigurerAdapterTests extends BaseSpringSpec {
         }
         }
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
                     .withUser("user").password("password").roles("USER")

+ 1 - 2
config/src/test/groovy/org/springframework/security/config/annotation/web/WebSecurityConfigurerAdapterTestsConfigs.java

@@ -61,8 +61,7 @@ public class WebSecurityConfigurerAdapterTestsConfigs {
         }
         }
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication().and()
                 .inMemoryAuthentication().and()
                 .jdbcAuthentication()
                 .jdbcAuthentication()

+ 1 - 2
config/src/test/groovy/org/springframework/security/config/annotation/web/configuration/BaseWebConfig.groovy

@@ -32,8 +32,7 @@ public abstract class BaseWebConfig extends WebSecurityConfigurerAdapter {
     BaseWebConfig() {
     BaseWebConfig() {
     }
     }
 
 
-    protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
         auth
         auth
             .inMemoryAuthentication()
             .inMemoryAuthentication()
                 .withUser("user").password("password").roles("USER").and()
                 .withUser("user").password("password").roles("USER").and()

+ 1 - 2
config/src/test/groovy/org/springframework/security/config/annotation/web/configuration/EnableWebSecurityTests.groovy

@@ -45,8 +45,7 @@ class EnableWebSecurityTests extends BaseSpringSpec {
     @Configuration
     @Configuration
     static class SecurityConfig extends WebSecurityConfigurerAdapter {
     static class SecurityConfig extends WebSecurityConfigurerAdapter {
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER");
                     .withUser("user").password("password").roles("USER");

+ 2 - 4
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/CsrfConfigurerTests.groovy

@@ -186,8 +186,7 @@ class CsrfConfigurerTests extends BaseSpringSpec {
                     .csrfTokenRepository(repo)
                     .csrfTokenRepository(repo)
         }
         }
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
                     .withUser("user").password("password").roles("USER")
@@ -342,8 +341,7 @@ class CsrfConfigurerTests extends BaseSpringSpec {
                     .csrfTokenRepository(repo)
                     .csrfTokenRepository(repo)
         }
         }
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
                     .withUser("user").password("password").roles("USER")

+ 1 - 2
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 {
     static class HttpBasicAndFormLoginEntryPointsConfig extends WebSecurityConfigurerAdapter {
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
                     .withUser("user").password("password").roles("USER")

+ 4 - 8
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ExpressionUrlAuthorizationsTests.groovy

@@ -277,8 +277,7 @@ public class ExpressionUrlAuthorizationConfigurerTests extends BaseSpringSpec {
         }
         }
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
                     .withUser("user").password("password").roles("USER")
@@ -374,8 +373,7 @@ public class ExpressionUrlAuthorizationConfigurerTests extends BaseSpringSpec {
         }
         }
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
                     .withUser("user").password("password").roles("USER")
@@ -418,8 +416,7 @@ public class ExpressionUrlAuthorizationConfigurerTests extends BaseSpringSpec {
         }
         }
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
                     .withUser("user").password("password").roles("USER")
@@ -451,8 +448,7 @@ public class ExpressionUrlAuthorizationConfigurerTests extends BaseSpringSpec {
         }
         }
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
         }
         }

+ 3 - 6
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/HttpBasicConfigurerTests.groovy

@@ -70,8 +70,7 @@ class HttpBasicConfigurerTests extends BaseSpringSpec {
         }
         }
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
         }
         }
@@ -99,8 +98,7 @@ class HttpBasicConfigurerTests extends BaseSpringSpec {
         }
         }
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
         }
         }
@@ -130,8 +128,7 @@ class HttpBasicConfigurerTests extends BaseSpringSpec {
         }
         }
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
         }
         }

+ 1 - 2
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpInterceptUrlTests.groovy

@@ -160,8 +160,7 @@ public class NamespaceHttpInterceptUrlTests extends BaseSpringSpec {
                     //    <intercept-url pattern="/**" requires-channel="http"/>
                     //    <intercept-url pattern="/**" requires-channel="http"/>
                     .anyRequest().requiresInsecure()
                     .anyRequest().requiresInsecure()
         }
         }
-        protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER").and()
                     .withUser("user").password("password").roles("USER").and()

+ 1 - 2
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpPortMappingsTests.groovy

@@ -99,8 +99,7 @@ public class NamespaceHttpPortMappingsTests extends BaseSpringSpec {
                     .anyRequest().requiresInsecure()
                     .anyRequest().requiresInsecure()
         }
         }
 
 
-        protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER").and()
                     .withUser("user").password("password").roles("USER").and()

+ 5 - 5
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpX509Tests.groovy

@@ -82,7 +82,7 @@ public class NamespaceHttpX509Tests extends BaseSpringSpec {
     @EnableWebSecurity
     @EnableWebSecurity
     public static class X509Config extends WebSecurityConfigurerAdapter {
     public static class X509Config extends WebSecurityConfigurerAdapter {
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth.
             auth.
                 inMemoryAuthentication()
                 inMemoryAuthentication()
                     .withUser("rod").password("password").roles("USER","ADMIN");
                     .withUser("rod").password("password").roles("USER","ADMIN");
@@ -116,7 +116,7 @@ public class NamespaceHttpX509Tests extends BaseSpringSpec {
     public static class AuthenticationDetailsSourceRefConfig extends WebSecurityConfigurerAdapter {
     public static class AuthenticationDetailsSourceRefConfig extends WebSecurityConfigurerAdapter {
         static AuthenticationDetailsSource<HttpServletRequest, PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails> AUTHENTICATION_DETAILS_SOURCE
         static AuthenticationDetailsSource<HttpServletRequest, PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails> AUTHENTICATION_DETAILS_SOURCE
 
 
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth.
             auth.
                 inMemoryAuthentication()
                 inMemoryAuthentication()
                     .withUser("rod").password("password").roles("USER","ADMIN");
                     .withUser("rod").password("password").roles("USER","ADMIN");
@@ -148,7 +148,7 @@ public class NamespaceHttpX509Tests extends BaseSpringSpec {
     @EnableWebSecurity
     @EnableWebSecurity
     public static class SubjectPrincipalRegexConfig extends WebSecurityConfigurerAdapter {
     public static class SubjectPrincipalRegexConfig extends WebSecurityConfigurerAdapter {
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth.
             auth.
                 inMemoryAuthentication()
                 inMemoryAuthentication()
                     .withUser("rod").password("password").roles("USER","ADMIN");
                     .withUser("rod").password("password").roles("USER","ADMIN");
@@ -181,7 +181,7 @@ public class NamespaceHttpX509Tests extends BaseSpringSpec {
     @EnableWebSecurity
     @EnableWebSecurity
     public static class UserDetailsServiceRefConfig extends WebSecurityConfigurerAdapter {
     public static class UserDetailsServiceRefConfig extends WebSecurityConfigurerAdapter {
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth.
             auth.
                 inMemoryAuthentication()
                 inMemoryAuthentication()
                     .withUser("rod").password("password").roles("USER","ADMIN");
                     .withUser("rod").password("password").roles("USER","ADMIN");
@@ -215,7 +215,7 @@ public class NamespaceHttpX509Tests extends BaseSpringSpec {
     public static class AuthenticationUserDetailsServiceConfig extends WebSecurityConfigurerAdapter {
     public static class AuthenticationUserDetailsServiceConfig extends WebSecurityConfigurerAdapter {
         static AuthenticationDetailsSource<HttpServletRequest, PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails> AUTHENTICATION_DETAILS_SOURCE
         static AuthenticationDetailsSource<HttpServletRequest, PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails> AUTHENTICATION_DETAILS_SOURCE
 
 
-        protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth.
             auth.
                 inMemoryAuthentication()
                 inMemoryAuthentication()
                     .withUser("rod").password("password").roles("USER","ADMIN");
                     .withUser("rod").password("password").roles("USER","ADMIN");

+ 1 - 2
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceRememberMeTests.groovy

@@ -303,8 +303,7 @@ public class NamespaceRememberMeTests extends BaseSpringSpec {
                 .rememberMe()
                 .rememberMe()
         }
         }
 
 
-        protected void registerAuthentication(
-                AuthenticationManagerBuilder auth) throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                     .userDetailsService(USERDETAILS_SERVICE);
                     .userDetailsService(USERDETAILS_SERVICE);
         }
         }

+ 1 - 2
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 {
     static class NoAuthorizedUrlsConfig extends WebSecurityConfigurerAdapter {
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
         }
         }

+ 2 - 3
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurerTests.groovy

@@ -73,8 +73,7 @@ public class RememberMeConfigurerTests extends BaseSpringSpec {
         }
         }
 
 
         @Override
         @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"))
             User user = new User("user", "password", AuthorityUtils.createAuthorityList("ROLE_USER"))
             DaoAuthenticationProvider provider = new DaoAuthenticationProvider()
             DaoAuthenticationProvider provider = new DaoAuthenticationProvider()
             provider.userDetailsService = new InMemoryUserDetailsManager([user])
             provider.userDetailsService = new InMemoryUserDetailsManager([user])
@@ -173,7 +172,7 @@ public class RememberMeConfigurerTests extends BaseSpringSpec {
         }
         }
 
 
         @Autowired
         @Autowired
-        public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) {
+        public void configureGlobal(AuthenticationManagerBuilder auth) {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER");
                     .withUser("user").password("password").roles("USER");

+ 1 - 2
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/RequestCacheConfigurerTests.groovy

@@ -174,8 +174,7 @@ class RequestCacheConfigurerTests extends BaseSpringSpec {
         }
         }
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
                     .withUser("user").password("password").roles("USER")

+ 2 - 4
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 {
     static class ServletApiConfig extends WebSecurityConfigurerAdapter {
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-            throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
                     .withUser("user").password("password").roles("USER")
@@ -102,8 +101,7 @@ class ServletApiConfigurerTests extends BaseSpringSpec {
         }
         }
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-            throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
                     .withUser("user").password("password").roles("USER")

+ 2 - 2
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerTests.groovy

@@ -144,7 +144,7 @@ class SessionManagementConfigurerTests extends BaseSpringSpec {
                     .maximumSessions(1)
                     .maximumSessions(1)
         }
         }
         @Override
         @Override
-        public void registerAuthentication(AuthenticationManagerBuilder auth) {
+        protected void configure(AuthenticationManagerBuilder auth) {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
                     .withUser("user").password("password").roles("USER")
@@ -188,7 +188,7 @@ class SessionManagementConfigurerTests extends BaseSpringSpec {
                         .maxSessionsPreventsLogin(true)
                         .maxSessionsPreventsLogin(true)
         }
         }
         @Override
         @Override
-        public void registerAuthentication(AuthenticationManagerBuilder auth) {
+        protected void configure(AuthenticationManagerBuilder auth) {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER")
                     .withUser("user").password("password").roles("USER")

+ 1 - 2
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 {
     static class InvokeTwiceDoesNotOverrideConfig extends WebSecurityConfigurerAdapter {
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
         }
         }

+ 1 - 2
config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerServlet31Tests.java

@@ -121,8 +121,7 @@ public class SessionManagementConfigurerServlet31Tests {
         }
         }
 
 
         @Override
         @Override
-        protected void registerAuthentication(AuthenticationManagerBuilder auth)
-                throws Exception {
+        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
             auth
             auth
                 .inMemoryAuthentication()
                 .inMemoryAuthentication()
                     .withUser("user").password("password").roles("USER");
                     .withUser("user").password("password").roles("USER");

+ 1 - 1
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 {
 public class SecurityConfig extends WebSecurityConfigurerAdapter {
 
 
     @Autowired
     @Autowired
-    public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
         auth
         auth
             .inMemoryAuthentication()
             .inMemoryAuthentication()
                 .withUser("user").password("password").roles("USER");
                 .withUser("user").password("password").roles("USER");

+ 4 - 4
docs/manual/src/asciidoctor/index.adoc

@@ -290,7 +290,7 @@ import org.springframework.security.config.annotation.web.configuration.*;
 public class SecurityConfig extends WebSecurityConfigurerAdapter {
 public class SecurityConfig extends WebSecurityConfigurerAdapter {
 
 
     @Autowired
     @Autowired
-    public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
         auth
         auth
             .inMemoryAuthentication()
             .inMemoryAuthentication()
                 .withUser("user").password("password").roles("USER");
                 .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]
 [source,java]
 ----
 ----
 @Autowired
 @Autowired
-public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
     auth
     auth
         .inMemoryAuthentication()
         .inMemoryAuthentication()
             .withUser("user").password("password").roles("USER").and()
             .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;
 private DataSource dataSource;
 
 
 @Autowired
 @Autowired
-public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
     auth
     auth
         .jdbcAuthentication()
         .jdbcAuthentication()
             .dataSource(dataSource)
             .dataSource(dataSource)
@@ -555,7 +555,7 @@ You can find the updates to suppport LDAP based authentication. The https://gith
 private DataSource dataSource;
 private DataSource dataSource;
 
 
 @Autowired
 @Autowired
-public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
     auth
     auth
         .ldapAuthentication()
         .ldapAuthentication()
             .userDnPatterns("uid={0},ou=people")
             .userDnPatterns("uid={0},ou=people")

+ 1 - 1
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 {
 public class SecurityConfig extends WebSecurityConfigurerAdapter {
 
 
     @Autowired
     @Autowired
-    public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
         auth
         auth
             .inMemoryAuthentication()
             .inMemoryAuthentication()
                 .withUser("user").password("password").roles("USER");
                 .withUser("user").password("password").roles("USER");

+ 1 - 1
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;
     private DataSource dataSource;
 
 
     @Autowired
     @Autowired
-    public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) throws Exception {
+    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
         auth
         auth
             .jdbcAuthentication()
             .jdbcAuthentication()
                 .dataSource(dataSource)
                 .dataSource(dataSource)

+ 1 - 1
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 {
 public class SecurityConfig extends WebSecurityConfigurerAdapter {
 
 
     @Autowired
     @Autowired
-    public void registerGlobalAuthentication(AuthenticationManagerBuilder auth)
+    public void configureGlobal(AuthenticationManagerBuilder auth)
             throws Exception {
             throws Exception {
         auth.
         auth.
             inMemoryAuthentication()
             inMemoryAuthentication()