SEC-2365: registerAuthentication->configure

This commit is contained in:
Rob Winch
2013-10-16 13:59:56 -05:00
parent db3c626ac9
commit 348e3a22b6
42 changed files with 109 additions and 165 deletions

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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)
}

View File

@@ -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

View File

@@ -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"))

View File

@@ -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()

View File

@@ -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()
}

View File

@@ -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()

View File

@@ -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()

View File

@@ -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")

View File

@@ -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()

View File

@@ -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()

View File

@@ -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");

View File

@@ -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")

View File

@@ -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")

View File

@@ -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()
}

View File

@@ -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()
}

View File

@@ -160,8 +160,7 @@ public class NamespaceHttpInterceptUrlTests extends BaseSpringSpec {
// <intercept-url pattern="/**" requires-channel="http"/>
.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()

View File

@@ -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()

View File

@@ -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<HttpServletRequest, PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails> 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<HttpServletRequest, PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails> 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");

View File

@@ -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);
}

View File

@@ -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()
}

View File

@@ -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");

View File

@@ -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")

View File

@@ -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")

View File

@@ -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")

View File

@@ -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()
}

View File

@@ -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");