net.gplatform:spring-social-qq

parent project for all gplatform project

Лицензия

Лицензия

Категории

Категории

Сеть ORM Данные
Группа

Группа

net.gplatform
Идентификатор

Идентификатор

spring-social-qq
Последняя версия

Последняя версия

1.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

parent project for all gplatform project
Организация-разработчик

Организация-разработчик

Shark Xu
Система контроля версий

Система контроля версий

https://github.com/zwzwzw/spring-social-qq

Скачать spring-social-qq

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/net.gplatform/spring-social-qq/ -->
<dependency>
    <groupId>net.gplatform</groupId>
    <artifactId>spring-social-qq</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/net.gplatform/spring-social-qq/
implementation 'net.gplatform:spring-social-qq:1.0.2'
// https://jarcasting.com/artifacts/net.gplatform/spring-social-qq/
implementation ("net.gplatform:spring-social-qq:1.0.2")
'net.gplatform:spring-social-qq:jar:1.0.2'
<dependency org="net.gplatform" name="spring-social-qq" rev="1.0.2">
  <artifact name="spring-social-qq" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.gplatform', module='spring-social-qq', version='1.0.2')
)
libraryDependencies += "net.gplatform" % "spring-social-qq" % "1.0.2"
[net.gplatform/spring-social-qq "1.0.2"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
net.gplatform : spring-social-base jar 1.0.3
net.gplatform : Sdk4J jar 2.0

Модули Проекта

Данный проект не имеет модулей.

##Config:

The config can be done by spring boot autoconfig.

U only need to impl & register SignInAdapter to context to perform signin after oauth check

##Usage:

  1. Add maven depency into your project

     <dependency>
     	<groupId>net.gplatform</groupId>
     	<artifactId>spring-social-qq</artifactId>
     	<version>1.0.2</version>
     </dependency>
    
  2. Config appId & appSecret

    • Copy qqconnectconfig.properties to your project classpath & change app_ID & app_KEY to the value you retrieved from Tencent Note: This is used by QQ SDK.

    • Also add above value under key spring.social.qq.appId & spring.social.qq.appSecret in application.properties Note: This is used by spring boot

  3. Implement SignInAdapter Code Example:

     @Component
     public class MySignInAdapter implements SignInAdapter {
     	@Override
     	public String signIn(String localUserId, Connection<?> connection, NativeWebRequest request) {
     		LoginUtil.signin(localUserId, null);
     		
     		String goToURL = "/home"
     		return goToURL;
     	}
     }
    
  4. Add QQ login button in your page

    Code Example:

     <form method="POST" action="/yourAppName/signin/qq">
     	<input type="hidden" name="scope" value="get_user_info,add_topic,add_one_blog,add_album,upload_pic,list_album,add_share,check_page_fans,add_t,add_pic_t,del_t,get_repost_list,get_info,get_other_info,get_fanslist,get_idollist,add_idol,del_ido,get_tenpay_addr">
     	<div class="row" style="margin-left: 10px;">
     		<button type="submit">
     			Login With QQ
     		</button>
     	</div>
     </form>
    

    Note: You need to replace yourAppName with correct value. For supported scope value, please refer to Open QQ specification in http://open.qq.com/

Версии библиотеки

Версия
1.0.2
1.0.1
1.0.0