!373 :refactor: 删除DelegatingAuthenticationConverter中多余的Converter

Merge pull request !373 from zouhhhhh/dev
This commit is contained in:
lbw 2023-06-08 03:08:40 +00:00 committed by Gitee
commit 745292d6d2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

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()));
} }