Skip to content

Commit 259f93a

Browse files
committed
Moved CachingUserDetailsService to spring-core
Made CachingUserDetailsService constructor public and moved to spring-core to make it easier to configure caching in UserDetailsService Fixes gh-4139
1 parent 90b9cfa commit 259f93a

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

config/src/main/java/org/springframework/security/config/authentication/AbstractUserDetailsServiceBeanDefinitionParser.java

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.springframework.beans.factory.support.RootBeanDefinition;
2525
import org.springframework.beans.factory.xml.BeanDefinitionParser;
2626
import org.springframework.beans.factory.xml.ParserContext;
27+
import org.springframework.security.authentication.CachingUserDetailsService;
2728
import org.springframework.security.config.BeanIds;
2829
import org.springframework.util.StringUtils;
2930
import org.w3c.dom.Element;

config/src/main/java/org/springframework/security/config/http/UserDetailsServiceFactoryBean.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.springframework.context.ApplicationContextAware;
2626
import org.springframework.context.ApplicationContextException;
2727
import org.springframework.security.config.authentication.AbstractUserDetailsServiceBeanDefinitionParser;
28-
import org.springframework.security.config.authentication.CachingUserDetailsService;
28+
import org.springframework.security.authentication.CachingUserDetailsService;
2929
import org.springframework.security.core.userdetails.AuthenticationUserDetailsService;
3030
import org.springframework.security.core.userdetails.UserDetailsByNameServiceWrapper;
3131
import org.springframework.security.core.userdetails.UserDetailsService;

config/src/test/java/org/springframework/security/config/authentication/JdbcUserServiceBeanDefinitionParserTests.java

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import org.junit.After;
1919
import org.junit.Test;
20+
import org.springframework.security.authentication.CachingUserDetailsService;
2021
import org.w3c.dom.Element;
2122

2223
import org.springframework.security.authentication.AuthenticationManager;
+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.security.config.authentication;
16+
package org.springframework.security.authentication;
1717

1818
import org.springframework.security.core.userdetails.UserCache;
1919
import org.springframework.security.core.userdetails.UserDetails;
@@ -30,7 +30,7 @@ public class CachingUserDetailsService implements UserDetailsService {
3030
private UserCache userCache = new NullUserCache();
3131
private final UserDetailsService delegate;
3232

33-
CachingUserDetailsService(UserDetailsService delegate) {
33+
public CachingUserDetailsService(UserDetailsService delegate) {
3434
this.delegate = delegate;
3535
}
3636

0 commit comments

Comments
 (0)