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
This commit is contained in:
ir73 2018-11-30 13:41:44 +02:00 committed by Rob Winch
parent 4178c92741
commit 9a357f8cb6
4 changed files with 5 additions and 3 deletions

View File

@ -24,6 +24,7 @@ import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.beans.factory.xml.BeanDefinitionParser;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.security.authentication.CachingUserDetailsService;
import org.springframework.security.config.BeanIds;
import org.springframework.util.StringUtils;
import org.w3c.dom.Element;

View File

@ -25,7 +25,7 @@ import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.ApplicationContextException;
import org.springframework.security.config.authentication.AbstractUserDetailsServiceBeanDefinitionParser;
import org.springframework.security.config.authentication.CachingUserDetailsService;
import org.springframework.security.authentication.CachingUserDetailsService;
import org.springframework.security.core.userdetails.AuthenticationUserDetailsService;
import org.springframework.security.core.userdetails.UserDetailsByNameServiceWrapper;
import org.springframework.security.core.userdetails.UserDetailsService;

View File

@ -17,6 +17,7 @@ package org.springframework.security.config.authentication;
import org.junit.After;
import org.junit.Test;
import org.springframework.security.authentication.CachingUserDetailsService;
import org.w3c.dom.Element;
import org.springframework.security.authentication.AuthenticationManager;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.config.authentication;
package org.springframework.security.authentication;
import org.springframework.security.core.userdetails.UserCache;
import org.springframework.security.core.userdetails.UserDetails;
@ -30,7 +30,7 @@ public class CachingUserDetailsService implements UserDetailsService {
private UserCache userCache = new NullUserCache();
private final UserDetailsService delegate;
CachingUserDetailsService(UserDetailsService delegate) {
public CachingUserDetailsService(UserDetailsService delegate) {
this.delegate = delegate;
}