1
0
mirror of synced 2026-08-04 17:27:13 +00:00

SEC-1775: Removed internal use of UserAttribute class in AnonymousAuthenticationFilter.

This commit is contained in:
Luke Taylor
2011-07-04 21:09:23 +01:00
parent 5d20f57fa8
commit 73442125de
4 changed files with 67 additions and 44 deletions
@@ -137,8 +137,8 @@ public class DefaultFilterChainValidator implements FilterChainProxy.FilterChain
}
// Simulate an anonymous access with the supplied attributes.
AnonymousAuthenticationToken token = new AnonymousAuthenticationToken("key", anonPF.getUserAttribute().getPassword(),
anonPF.getUserAttribute().getAuthorities());
AnonymousAuthenticationToken token = new AnonymousAuthenticationToken("key", anonPF.getPrincipal(),
anonPF.getAuthorities());
try {
fsi.getAccessDecisionManager().decide(token, loginRequest, attributes);
} catch (AccessDeniedException e) {
@@ -170,9 +170,9 @@ class MiscHttpConfigTests extends AbstractHttpConfigTests {
AnonymousAuthenticationFilter filter = getFilter(AnonymousAuthenticationFilter);
expect:
'customKey' == filter.getKey()
'joe' == filter.userAttribute.password
'anonymity' == filter.userAttribute.authorities[0].authority
'customKey' == filter.key
'joe' == filter.principal
'anonymity' == filter.authorities[0].authority
}
def httpMethodMatchIsSupported() {