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
1 changed files with 1 additions and 1 deletions

View File

@ -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) {