完善文档
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
package com.micro.fast.security.core.social.qq.config;
|
||||
|
||||
import com.micro.fast.security.core.master.SecurityProperties;
|
||||
import com.micro.fast.security.core.social.qq.QQSocialProperties;
|
||||
import com.micro.fast.security.core.social.qq.connet.QQConnectionFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.autoconfigure.social.SocialAutoConfigurerAdapter;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.social.connect.ConnectionFactory;
|
||||
|
||||
/**
|
||||
* @author lsy
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnProperty(prefix = "ms.security.social.qq",name = "app-id")
|
||||
public class QQAutoConfig extends SocialAutoConfigurerAdapter {
|
||||
|
||||
@Autowired
|
||||
private SecurityProperties securityProperties;
|
||||
|
||||
@Override
|
||||
protected ConnectionFactory<?> createConnectionFactory() {
|
||||
QQSocialProperties qq = securityProperties.getSocial().getQq();
|
||||
return new QQConnectionFactory(qq.getProviderId(),qq.getAppId(),qq.getAppSecret());
|
||||
}
|
||||
}
|
||||
+1
@@ -13,6 +13,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* 处理qq第三方登录返回授权码Template,默认的OAuth2Template创建的template不能处理text/html的response
|
||||
* 这个类在QQServiceProvider类中被实例化
|
||||
* @author lsy
|
||||
*/
|
||||
public class QQOAuth2Template extends OAuth2Template{
|
||||
|
||||
Reference in New Issue
Block a user