完善文档

This commit is contained in:
winLsy
2018-01-17 13:56:48 +08:00
parent 310e629928
commit 9bfde42a6b
2 changed files with 28 additions and 0 deletions
@@ -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());
}
}
@@ -13,6 +13,7 @@ import java.util.List;
/**
* 处理qq第三方登录返回授权码Template,默认的OAuth2Template创建的template不能处理text/html的response
* 这个类在QQServiceProvider类中被实例化
* @author lsy
*/
public class QQOAuth2Template extends OAuth2Template{