SEC-1775: Removed internal use of UserAttribute class in AnonymousAuthenticationFilter.
This commit is contained in:
+2
-2
@@ -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) {
|
||||
|
||||
+3
-3
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user