mirror of
https://gitee.com/log4j/pig.git
synced 2024-12-22 20:54:25 +08:00
🎨 Improving structure / format of the code. 格式化代码
This commit is contained in:
parent
f472e701ac
commit
0f4ca191b2
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user