Polish TestingAuthenticationToken

Restore List constructor to retain binary compatibility.
This commit is contained in:
Josh Cummings 2023-06-05 15:42:07 -06:00
parent 5a7eb108c8
commit 97cff7c715
1 changed files with 8 additions and 1 deletions

View File

@ -16,6 +16,7 @@
package org.springframework.security.authentication;
import java.util.Collection;
import java.util.List;
import org.springframework.security.core.GrantedAuthority;
@ -47,7 +48,13 @@ public class TestingAuthenticationToken extends AbstractAuthenticationToken {
this(principal, credentials, AuthorityUtils.createAuthorityList(authorities));
}
public TestingAuthenticationToken(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities) {
public TestingAuthenticationToken(Object principal, Object credentials,
List<? extends GrantedAuthority> authorities) {
this(principal, credentials, (Collection<? extends GrantedAuthority>) authorities);
}
public TestingAuthenticationToken(Object principal, Object credentials,
Collection<? extends GrantedAuthority> authorities) {
super(authorities);
this.principal = principal;
this.credentials = credentials;