-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
in: configAn issue in spring-security-configAn issue in spring-security-configin: coreAn issue in spring-security-coreAn issue in spring-security-corestatus: duplicateA duplicate of another issueA duplicate of another issuetype: enhancementA general enhancementA general enhancementtype: jiraAn issue that was migrated from JIRAAn issue that was migrated from JIRA
Description
Marten Deinum (Migrated from SEC-2620) said:
Trying to configure caching for anything else then the jdbcAuthentication()
is painful. Where ldap caching is easily configured in XML that feature is (currently) not available in Java Config (at least I couldn't find it).
However to make caching configuration easier it would be nice if the CachingUserDetailsService
could be made constructable from outside the package (maybe move to another package?). That way overriding the userDetailsService()
method from the WebSecurityConfigurerAdapter
would allow easy wrapping of the used UserDetailsService
with caching
@Override
protected UserDetailsService userDetailsService() {
UserDetailsService delegate = super.userDetailsService();
CachingUserDetailsService userDetailsService = new CachingUserDetailsService(delegate);
userDetailsService.setUserCache(userCache());
return userDetailsService;
}
That way every UserDetailsService
can be made cacheable without having to expose userCache
methods for each configurer.
bedla
Metadata
Metadata
Assignees
Labels
in: configAn issue in spring-security-configAn issue in spring-security-configin: coreAn issue in spring-security-coreAn issue in spring-security-corestatus: duplicateA duplicate of another issueA duplicate of another issuetype: enhancementA general enhancementA general enhancementtype: jiraAn issue that was migrated from JIRAAn issue that was migrated from JIRA