TestingAuthenticationToken takes broader collection type

So that callers do not have to cast.

Closes gh-12953
This commit is contained in:
Laurent Martelli 2023-03-31 00:53:22 +02:00 committed by Josh Cummings
parent b09a228eaf
commit f25d76c48f

View File

@ -47,7 +47,7 @@ public class TestingAuthenticationToken extends AbstractAuthenticationToken {
this(principal, credentials, AuthorityUtils.createAuthorityList(authorities));
}
public TestingAuthenticationToken(Object principal, Object credentials, List<GrantedAuthority> authorities) {
public TestingAuthenticationToken(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities) {
super(authorities);
this.principal = principal;
this.credentials = credentials;