Call setAuthenticated() in constructor with authorities to mimic behaviour of UsernamePasswordAuthenticationToken
This commit is contained in:
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) {
|
||||
|
|
Loading…
Reference in New Issue