DigestProcessingFilter now provides userCache getter and setter.
This commit is contained in:
parent
0530351f0d
commit
c936801842
|
@ -435,6 +435,14 @@ public class DigestProcessingFilter implements Filter, InitializingBean {
|
|||
return digestMd5;
|
||||
}
|
||||
|
||||
public void setUserCache(UserCache userCache) {
|
||||
this.userCache = userCache;
|
||||
}
|
||||
|
||||
public UserCache getUserCache() {
|
||||
return userCache;
|
||||
}
|
||||
|
||||
public void init(FilterConfig arg0) throws ServletException {}
|
||||
|
||||
private void fail(ServletRequest request, ServletResponse response,
|
||||
|
|
|
@ -27,6 +27,7 @@ import net.sf.acegisecurity.context.ContextHolder;
|
|||
import net.sf.acegisecurity.context.security.SecureContextImpl;
|
||||
import net.sf.acegisecurity.context.security.SecureContextUtils;
|
||||
import net.sf.acegisecurity.providers.dao.AuthenticationDao;
|
||||
import net.sf.acegisecurity.providers.dao.UserCache;
|
||||
import net.sf.acegisecurity.providers.dao.UsernameNotFoundException;
|
||||
import net.sf.acegisecurity.util.StringSplitUtils;
|
||||
|
||||
|
@ -193,6 +194,11 @@ public class DigestProcessingFilterTests extends TestCase {
|
|||
|
||||
filter.setAuthenticationEntryPoint(new DigestProcessingFilterEntryPoint());
|
||||
assertTrue(filter.getAuthenticationEntryPoint() != null);
|
||||
|
||||
filter.setUserCache(null);
|
||||
assertNull(filter.getUserCache());
|
||||
filter.setUserCache(new MockUserCache());
|
||||
assertNotNull(filter.getUserCache());
|
||||
}
|
||||
|
||||
public void testInvalidDigestAuthorizationTokenGeneratesError()
|
||||
|
@ -885,4 +891,14 @@ public class DigestProcessingFilterTests extends TestCase {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class MockUserCache implements UserCache {
|
||||
public UserDetails getUserFromCache(String username) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void putUserInCache(UserDetails user) {}
|
||||
|
||||
public void removeUserFromCache(String username) {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
<action dev="benalex" type="fix">TokenBasedRememberMeServices now respects expired users, expired credentials and disabled users</action>
|
||||
<action dev="benalex" type="fix">HttpSessionContextIntegrationFilter now handles HttpSession invalidation without redirection</action>
|
||||
<action dev="benalex" type="fix">StringSplitUtils.split() ignored delimiter argument</action>
|
||||
<action dev="benalex" type="fix">DigestProcessingFilter now provides userCache getter and setter</action>
|
||||
</release>
|
||||
<release version="0.8.0" date="2005-03-03">
|
||||
<action dev="benalex" type="add">Added Digest Authentication support (RFC 2617 and RFC 2069)</action>
|
||||
|
|
Loading…
Reference in New Issue