提交 0f4ca191 编写于 作者: L lbw

🎨 Improving structure / format of the code. 格式化代码

上级 f472e701
......@@ -51,7 +51,7 @@ import java.util.Arrays;
/**
* @author lengleng
* @date 2022/5/27
*
* <p>
* 认证服务器配置
*/
@Configuration
......@@ -115,22 +115,17 @@ public class AuthorizationServerConfiguration {
* @return DelegatingAuthenticationConverter
*/
private AuthenticationConverter accessTokenRequestConverter() {
return new DelegatingAuthenticationConverter(Arrays.asList(
new OAuth2ResourceOwnerPasswordAuthenticationConverter(),
new OAuth2ResourceOwnerSmsAuthenticationConverter(),
// OAuth2TokenEndpointFilter中构造的DelegatingAuthenticationConverter中已经创建了这三个,会重复调用
// new OAuth2RefreshTokenAuthenticationConverter(),
// new OAuth2ClientCredentialsAuthenticationConverter(),
// new OAuth2AuthorizationCodeAuthenticationConverter(),
new OAuth2AuthorizationCodeRequestAuthenticationConverter()));
return new DelegatingAuthenticationConverter(
Arrays.asList(new OAuth2ResourceOwnerPasswordAuthenticationConverter(),
new OAuth2ResourceOwnerSmsAuthenticationConverter(),
new OAuth2AuthorizationCodeRequestAuthenticationConverter()));
}
/**
* 注入授权模式实现提供方
*
* <p>
* 1. 密码模式 </br>
* 2. 短信登录 </br>
*
*/
@SuppressWarnings("unchecked")
private void addCustomOAuth2GrantAuthenticationProvider(HttpSecurity http) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册