1
0
mirror of synced 2026-05-22 21:33:16 +00:00

Call setAuthenticated() in constructor with authorities to mimic behaviour of UsernamePasswordAuthenticationToken

This commit is contained in:
Luke Taylor
2008-11-13 07:29:43 +00:00
parent 3ef34122fc
commit ee13be47b7
@@ -45,9 +45,9 @@ public class TestingAuthenticationToken extends AbstractAuthenticationToken {
this.credentials = credentials;
}
public TestingAuthenticationToken(Object principal, Object credentials, String... authorities) {
this(principal, credentials, AuthorityUtils.createAuthorityList(authorities));
setAuthenticated(true);
}
public TestingAuthenticationToken(Object principal, Object credentials, GrantedAuthority[] authorities) {