:refactor: 删除DelegatingAuthenticationConverter中多余的Converter

This commit is contained in:
zouhhhhh 2023-06-07 23:34:25 +08:00
parent 177a52d0bc
commit 78b83e70e8

View File

@ -117,9 +117,11 @@ public class AuthorizationServerConfiguration {
private AuthenticationConverter accessTokenRequestConverter() { private AuthenticationConverter accessTokenRequestConverter() {
return new DelegatingAuthenticationConverter(Arrays.asList( return new DelegatingAuthenticationConverter(Arrays.asList(
new OAuth2ResourceOwnerPasswordAuthenticationConverter(), new OAuth2ResourceOwnerPasswordAuthenticationConverter(),
new OAuth2ResourceOwnerSmsAuthenticationConverter(), new OAuth2RefreshTokenAuthenticationConverter(), new OAuth2ResourceOwnerSmsAuthenticationConverter(),
new OAuth2ClientCredentialsAuthenticationConverter(), // OAuth2TokenEndpointFilter中构造的DelegatingAuthenticationConverter中已经创建了这三个会重复调用
new OAuth2AuthorizationCodeAuthenticationConverter(), // new OAuth2RefreshTokenAuthenticationConverter(),
// new OAuth2ClientCredentialsAuthenticationConverter(),
// new OAuth2AuthorizationCodeAuthenticationConverter(),
new OAuth2AuthorizationCodeRequestAuthenticationConverter())); new OAuth2AuthorizationCodeRequestAuthenticationConverter()));
} }