From 78b83e70e8a31ae891c9c2faf475c044782f8a1b Mon Sep 17 00:00:00 2001 From: zouhhhhh <1179036329@qq.com> Date: Wed, 7 Jun 2023 23:34:25 +0800 Subject: [PATCH] =?UTF-8?q?:refactor:=20=E5=88=A0=E9=99=A4DelegatingAuthen?= =?UTF-8?q?ticationConverter=E4=B8=AD=E5=A4=9A=E4=BD=99=E7=9A=84Converter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pig/auth/config/AuthorizationServerConfiguration.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pig-auth/src/main/java/com/pig4cloud/pig/auth/config/AuthorizationServerConfiguration.java b/pig-auth/src/main/java/com/pig4cloud/pig/auth/config/AuthorizationServerConfiguration.java index 8f1d0b8c..d41ea5d9 100755 --- a/pig-auth/src/main/java/com/pig4cloud/pig/auth/config/AuthorizationServerConfiguration.java +++ b/pig-auth/src/main/java/com/pig4cloud/pig/auth/config/AuthorizationServerConfiguration.java @@ -117,9 +117,11 @@ public class AuthorizationServerConfiguration { private AuthenticationConverter accessTokenRequestConverter() { return new DelegatingAuthenticationConverter(Arrays.asList( new OAuth2ResourceOwnerPasswordAuthenticationConverter(), - new OAuth2ResourceOwnerSmsAuthenticationConverter(), new OAuth2RefreshTokenAuthenticationConverter(), - new OAuth2ClientCredentialsAuthenticationConverter(), - new OAuth2AuthorizationCodeAuthenticationConverter(), + new OAuth2ResourceOwnerSmsAuthenticationConverter(), + // OAuth2TokenEndpointFilter中构造的DelegatingAuthenticationConverter中已经创建了这三个,会重复调用 + // new OAuth2RefreshTokenAuthenticationConverter(), + // new OAuth2ClientCredentialsAuthenticationConverter(), + // new OAuth2AuthorizationCodeAuthenticationConverter(), new OAuth2AuthorizationCodeRequestAuthenticationConverter())); }