Merge pull request #28532 from jzheaux

* pr/28532:
  Update copyright year of changed file
  Harmonize @ConditionalOnMissingBean definition

Closes gh-28532
2.4.x
Stephane Nicoll 3 years ago
commit 9d02d9a07d

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -58,7 +58,8 @@ import org.springframework.util.StringUtils;
@ConditionalOnMissingBean( @ConditionalOnMissingBean(
value = { AuthenticationManager.class, AuthenticationProvider.class, UserDetailsService.class }, value = { AuthenticationManager.class, AuthenticationProvider.class, UserDetailsService.class },
type = { "org.springframework.security.oauth2.jwt.JwtDecoder", type = { "org.springframework.security.oauth2.jwt.JwtDecoder",
"org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector" }) "org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector",
"org.springframework.security.oauth2.client.registration.ClientRegistrationRepository" })
public class UserDetailsServiceAutoConfiguration { public class UserDetailsServiceAutoConfiguration {
private static final String NOOP_PASSWORD_PREFIX = "{noop}"; private static final String NOOP_PASSWORD_PREFIX = "{noop}";
@ -68,8 +69,6 @@ public class UserDetailsServiceAutoConfiguration {
private static final Log logger = LogFactory.getLog(UserDetailsServiceAutoConfiguration.class); private static final Log logger = LogFactory.getLog(UserDetailsServiceAutoConfiguration.class);
@Bean @Bean
@ConditionalOnMissingBean(
type = "org.springframework.security.oauth2.client.registration.ClientRegistrationRepository")
@Lazy @Lazy
public InMemoryUserDetailsManager inMemoryUserDetailsManager(SecurityProperties properties, public InMemoryUserDetailsManager inMemoryUserDetailsManager(SecurityProperties properties,
ObjectProvider<PasswordEncoder> passwordEncoder) { ObjectProvider<PasswordEncoder> passwordEncoder) {

Loading…
Cancel
Save