mirror of
https://gitee.com/yadong.zhang/JustAuth.git
synced 2025-12-06 16:58:24 +08:00
🍻 集成推特
This commit is contained in:
commit
9f341389d2
5
pom.xml
5
pom.xml
@ -6,13 +6,14 @@
|
||||
|
||||
<groupId>me.zhyd.oauth</groupId>
|
||||
<artifactId>JustAuth</artifactId>
|
||||
<version>1.12.0</version>
|
||||
<version>1.13.0</version>
|
||||
|
||||
<name>JustAuth</name>
|
||||
<url>https://gitee.com/yadong.zhang/JustAuth</url>
|
||||
<description>
|
||||
史上最全的整合第三方登录的开源库。目前已支持Github、Gitee、微博、钉钉、百度、Coding、腾讯云开发者平台、OSChina、支付宝、
|
||||
QQ、微信、淘宝、Google、Facebook、抖音、领英、小米、微软、今日头条、Teambition、StackOverflow、Pinterest、人人、华为、企业微信、酷家乐和Gitlab等第三方平台的授权登录。
|
||||
QQ、微信、淘宝、Google、Facebook、抖音、领英、小米、微软、今日头条、Teambition、StackOverflow、Pinterest、人人、华为、
|
||||
企业微信、酷家乐、Gitlab、美团、饿了么和推特等第三方平台的授权登录。
|
||||
Login, so easy!
|
||||
</description>
|
||||
|
||||
|
||||
@ -677,7 +677,7 @@ public enum AuthDefaultSource implements AuthSource {
|
||||
/**
|
||||
* Twitter
|
||||
*
|
||||
* @since 1.12.0
|
||||
* @since 1.13.0
|
||||
*/
|
||||
TWITTER {
|
||||
@Override
|
||||
|
||||
@ -4,6 +4,8 @@ import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 授权回调时的参数类
|
||||
*
|
||||
@ -13,7 +15,7 @@ import lombok.Setter;
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
public class AuthCallback {
|
||||
public class AuthCallback implements Serializable {
|
||||
|
||||
/**
|
||||
* 访问AuthorizeUrl后回调时带的参数code
|
||||
@ -40,14 +42,14 @@ public class AuthCallback {
|
||||
/**
|
||||
* Twitter回调后返回的oauth_token
|
||||
*
|
||||
* @since 1.12.0
|
||||
* @since 1.13.0
|
||||
*/
|
||||
private String oauthToken;
|
||||
|
||||
/**
|
||||
* Twitter回调后返回的oauth_verifier
|
||||
*
|
||||
* @since 1.12.0
|
||||
* @since 1.13.0
|
||||
*/
|
||||
private String oauthVerifier;
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package me.zhyd.oauth.model;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import me.zhyd.oauth.enums.AuthResponseStatus;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* JustAuth统一授权响应类
|
||||
@ -12,7 +13,7 @@ import me.zhyd.oauth.enums.AuthResponseStatus;
|
||||
*/
|
||||
@Getter
|
||||
@Builder
|
||||
public class AuthResponse<T> {
|
||||
public class AuthResponse<T> implements Serializable {
|
||||
/**
|
||||
* 授权响应状态码
|
||||
*/
|
||||
|
||||
@ -3,6 +3,7 @@ package me.zhyd.oauth.model;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 授权所需的token
|
||||
@ -13,7 +14,7 @@ import lombok.Setter;
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
public class AuthToken {
|
||||
public class AuthToken implements Serializable {
|
||||
private String accessToken;
|
||||
private int expireIn;
|
||||
private String refreshToken;
|
||||
@ -45,7 +46,7 @@ public class AuthToken {
|
||||
/**
|
||||
* Twitter附带属性
|
||||
*
|
||||
* @since 1.12.0
|
||||
* @since 1.13.0
|
||||
*/
|
||||
private String oauthToken;
|
||||
private String oauthTokenSecret;
|
||||
|
||||
@ -2,6 +2,7 @@ package me.zhyd.oauth.model;
|
||||
|
||||
import lombok.*;
|
||||
import me.zhyd.oauth.enums.AuthUserGender;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 授权成功后的用户信息,根据授权平台的不同,获取的数据完整性也不同
|
||||
@ -14,7 +15,7 @@ import me.zhyd.oauth.enums.AuthUserGender;
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AuthUser {
|
||||
public class AuthUser implements Serializable {
|
||||
/**
|
||||
* 用户第三方系统的唯一id。在调用方集成改组件时,可以用uuid + source唯一确定一个用户
|
||||
*
|
||||
|
||||
@ -23,7 +23,7 @@ import static me.zhyd.oauth.utils.GlobalAuthUtil.urlEncode;
|
||||
* Twitter登录
|
||||
*
|
||||
* @author hongwei.peng (pengisgood(at)gmail(dot)com)
|
||||
* @since 1.12.0
|
||||
* @since 1.13.0
|
||||
*/
|
||||
public class AuthTwitterRequest extends AuthDefaultRequest {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user