提交 64aa1940 编写于 作者: 智布道's avatar 智布道 👁

💡 优化注释

上级 56c1e4ea
...@@ -6,7 +6,6 @@ import lombok.*; ...@@ -6,7 +6,6 @@ import lombok.*;
* JustAuth配置类 * JustAuth配置类
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.9.3
* @since 1.8 * @since 1.8
*/ */
@Getter @Getter
......
...@@ -7,7 +7,6 @@ import me.zhyd.oauth.model.AuthResponseStatus; ...@@ -7,7 +7,6 @@ import me.zhyd.oauth.model.AuthResponseStatus;
* 各api需要的url, 用枚举类分平台类型管理 * 各api需要的url, 用枚举类分平台类型管理
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.0 * @since 1.0
*/ */
public enum AuthSource { public enum AuthSource {
......
...@@ -7,7 +7,6 @@ import lombok.Getter; ...@@ -7,7 +7,6 @@ import lombok.Getter;
* 今日头条授权登录时的异常状态码 * 今日头条授权登录时的异常状态码
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
@Getter @Getter
......
...@@ -9,7 +9,6 @@ import java.util.Arrays; ...@@ -9,7 +9,6 @@ import java.util.Arrays;
* 用户性别 * 用户性别
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
@Getter @Getter
......
...@@ -4,7 +4,6 @@ import me.zhyd.oauth.model.AuthResponseStatus; ...@@ -4,7 +4,6 @@ import me.zhyd.oauth.model.AuthResponseStatus;
/** /**
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthException extends RuntimeException { public class AuthException extends RuntimeException {
......
...@@ -7,7 +7,6 @@ import lombok.Setter; ...@@ -7,7 +7,6 @@ import lombok.Setter;
* 授权回调时的参数类 * 授权回调时的参数类
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
@Getter @Getter
......
...@@ -8,7 +8,6 @@ import lombok.Setter; ...@@ -8,7 +8,6 @@ import lombok.Setter;
* JustAuth统一授权响应类 * JustAuth统一授权响应类
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
@Getter @Getter
......
...@@ -5,7 +5,6 @@ import lombok.Getter; ...@@ -5,7 +5,6 @@ import lombok.Getter;
/** /**
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
@Getter @Getter
......
...@@ -9,7 +9,6 @@ import lombok.Setter; ...@@ -9,7 +9,6 @@ import lombok.Setter;
* 授权所需的token * 授权所需的token
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
@Getter @Getter
......
...@@ -10,7 +10,6 @@ import me.zhyd.oauth.enums.AuthUserGender; ...@@ -10,7 +10,6 @@ import me.zhyd.oauth.enums.AuthUserGender;
* 授权成功后的用户信息,根据授权平台的不同,获取的数据完整性也不同 * 授权成功后的用户信息,根据授权平台的不同,获取的数据完整性也不同
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
@Getter @Getter
......
...@@ -21,7 +21,6 @@ import me.zhyd.oauth.utils.UrlBuilder; ...@@ -21,7 +21,6 @@ import me.zhyd.oauth.utils.UrlBuilder;
* 支付宝登录 * 支付宝登录
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthAlipayRequest extends AuthDefaultRequest { public class AuthAlipayRequest extends AuthDefaultRequest {
...@@ -90,6 +89,7 @@ public class AuthAlipayRequest extends AuthDefaultRequest { ...@@ -90,6 +89,7 @@ public class AuthAlipayRequest extends AuthDefaultRequest {
* *
* @param state state 验证授权流程的参数,可以防止csrf * @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址 * @return 返回授权地址
* @since 1.9.3
*/ */
@Override @Override
public String authorize(String state) { public String authorize(String state) {
......
...@@ -15,7 +15,6 @@ import me.zhyd.oauth.utils.UrlBuilder; ...@@ -15,7 +15,6 @@ import me.zhyd.oauth.utils.UrlBuilder;
* 百度账号登录 * 百度账号登录
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthBaiduRequest extends AuthDefaultRequest { public class AuthBaiduRequest extends AuthDefaultRequest {
...@@ -83,6 +82,7 @@ public class AuthBaiduRequest extends AuthDefaultRequest { ...@@ -83,6 +82,7 @@ public class AuthBaiduRequest extends AuthDefaultRequest {
* *
* @param state state 验证授权流程的参数,可以防止csrf * @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址 * @return 返回授权地址
* @since 1.9.3
*/ */
@Override @Override
public String authorize(String state) { public String authorize(String state) {
......
...@@ -15,7 +15,6 @@ import me.zhyd.oauth.utils.UrlBuilder; ...@@ -15,7 +15,6 @@ import me.zhyd.oauth.utils.UrlBuilder;
* Cooding登录 * Cooding登录
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthCodingRequest extends AuthDefaultRequest { public class AuthCodingRequest extends AuthDefaultRequest {
...@@ -75,6 +74,7 @@ public class AuthCodingRequest extends AuthDefaultRequest { ...@@ -75,6 +74,7 @@ public class AuthCodingRequest extends AuthDefaultRequest {
* *
* @param state state 验证授权流程的参数,可以防止csrf * @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址 * @return 返回授权地址
* @since 1.9.3
*/ */
@Override @Override
public String authorize(String state) { public String authorize(String state) {
......
...@@ -14,7 +14,6 @@ import me.zhyd.oauth.model.AuthUser; ...@@ -14,7 +14,6 @@ import me.zhyd.oauth.model.AuthUser;
* CSDN登录 * CSDN登录
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
@Deprecated @Deprecated
......
...@@ -16,7 +16,6 @@ import me.zhyd.oauth.utils.UrlBuilder; ...@@ -16,7 +16,6 @@ import me.zhyd.oauth.utils.UrlBuilder;
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @author yangkai.shen (https://xkcoding.com) * @author yangkai.shen (https://xkcoding.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
@Slf4j @Slf4j
...@@ -67,6 +66,7 @@ public abstract class AuthDefaultRequest implements AuthRequest { ...@@ -67,6 +66,7 @@ public abstract class AuthDefaultRequest implements AuthRequest {
* 建议使用{@link AuthDefaultRequest#authorize(String)}方法生成授权地址,在回调方法中对{@code state}进行校验 * 建议使用{@link AuthDefaultRequest#authorize(String)}方法生成授权地址,在回调方法中对{@code state}进行校验
* *
* @return 返回授权地址 * @return 返回授权地址
* @see AuthDefaultRequest#authorize(String)
*/ */
@Deprecated @Deprecated
@Override @Override
...@@ -79,6 +79,7 @@ public abstract class AuthDefaultRequest implements AuthRequest { ...@@ -79,6 +79,7 @@ public abstract class AuthDefaultRequest implements AuthRequest {
* *
* @param state state 验证授权流程的参数,可以防止csrf * @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址 * @return 返回授权地址
* @since 1.9.3
*/ */
@Override @Override
public String authorize(String state) { public String authorize(String state) {
...@@ -178,6 +179,7 @@ public abstract class AuthDefaultRequest implements AuthRequest { ...@@ -178,6 +179,7 @@ public abstract class AuthDefaultRequest implements AuthRequest {
* @param authToken token封装 * @param authToken token封装
* @return HttpResponse * @return HttpResponse
*/ */
@Deprecated
protected HttpResponse doPostUserInfo(AuthToken authToken) { protected HttpResponse doPostUserInfo(AuthToken authToken) {
return HttpRequest.post(userInfoUrl(authToken)).execute(); return HttpRequest.post(userInfoUrl(authToken)).execute();
} }
...@@ -197,7 +199,9 @@ public abstract class AuthDefaultRequest implements AuthRequest { ...@@ -197,7 +199,9 @@ public abstract class AuthDefaultRequest implements AuthRequest {
* *
* @param authToken token封装 * @param authToken token封装
* @return HttpResponse * @return HttpResponse
* @since
*/ */
@Deprecated
protected HttpResponse doPostRevoke(AuthToken authToken) { protected HttpResponse doPostRevoke(AuthToken authToken) {
return HttpRequest.post(revokeUrl(authToken)).execute(); return HttpRequest.post(revokeUrl(authToken)).execute();
} }
......
...@@ -18,7 +18,6 @@ import me.zhyd.oauth.utils.UrlBuilder; ...@@ -18,7 +18,6 @@ import me.zhyd.oauth.utils.UrlBuilder;
* 钉钉登录 * 钉钉登录
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthDingTalkRequest extends AuthDefaultRequest { public class AuthDingTalkRequest extends AuthDefaultRequest {
...@@ -62,6 +61,7 @@ public class AuthDingTalkRequest extends AuthDefaultRequest { ...@@ -62,6 +61,7 @@ public class AuthDingTalkRequest extends AuthDefaultRequest {
* *
* @param state state 验证授权流程的参数,可以防止csrf * @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址 * @return 返回授权地址
* @since 1.9.3
*/ */
@Override @Override
public String authorize(String state) { public String authorize(String state) {
......
...@@ -15,7 +15,6 @@ import me.zhyd.oauth.utils.UrlBuilder; ...@@ -15,7 +15,6 @@ import me.zhyd.oauth.utils.UrlBuilder;
* 抖音登录 * 抖音登录
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthDouyinRequest extends AuthDefaultRequest { public class AuthDouyinRequest extends AuthDefaultRequest {
...@@ -93,6 +92,7 @@ public class AuthDouyinRequest extends AuthDefaultRequest { ...@@ -93,6 +92,7 @@ public class AuthDouyinRequest extends AuthDefaultRequest {
* *
* @param state state 验证授权流程的参数,可以防止csrf * @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址 * @return 返回授权地址
* @since 1.9.3
*/ */
@Override @Override
public String authorize(String state) { public String authorize(String state) {
......
...@@ -15,7 +15,6 @@ import me.zhyd.oauth.utils.UrlBuilder; ...@@ -15,7 +15,6 @@ import me.zhyd.oauth.utils.UrlBuilder;
* Facebook登录 * Facebook登录
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthFacebookRequest extends AuthDefaultRequest { public class AuthFacebookRequest extends AuthDefaultRequest {
......
...@@ -14,7 +14,6 @@ import me.zhyd.oauth.model.AuthUser; ...@@ -14,7 +14,6 @@ import me.zhyd.oauth.model.AuthUser;
* Gitee登录 * Gitee登录
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthGiteeRequest extends AuthDefaultRequest { public class AuthGiteeRequest extends AuthDefaultRequest {
......
...@@ -17,7 +17,6 @@ import java.util.Map; ...@@ -17,7 +17,6 @@ import java.util.Map;
* Github登录 * Github登录
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthGithubRequest extends AuthDefaultRequest { public class AuthGithubRequest extends AuthDefaultRequest {
......
...@@ -16,7 +16,6 @@ import me.zhyd.oauth.utils.UrlBuilder; ...@@ -16,7 +16,6 @@ import me.zhyd.oauth.utils.UrlBuilder;
* Google登录 * Google登录
* *
* @author yangkai.shen (https://xkcoding.com) * @author yangkai.shen (https://xkcoding.com)
* @version 1.3
* @since 1.3 * @since 1.3
*/ */
public class AuthGoogleRequest extends AuthDefaultRequest { public class AuthGoogleRequest extends AuthDefaultRequest {
...@@ -65,6 +64,7 @@ public class AuthGoogleRequest extends AuthDefaultRequest { ...@@ -65,6 +64,7 @@ public class AuthGoogleRequest extends AuthDefaultRequest {
* *
* @param state state 验证授权流程的参数,可以防止csrf * @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址 * @return 返回授权地址
* @since 1.9.3
*/ */
@Override @Override
public String authorize(String state) { public String authorize(String state) {
......
...@@ -18,7 +18,6 @@ import me.zhyd.oauth.utils.UrlBuilder; ...@@ -18,7 +18,6 @@ import me.zhyd.oauth.utils.UrlBuilder;
* 领英登录 * 领英登录
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthLinkedinRequest extends AuthDefaultRequest { public class AuthLinkedinRequest extends AuthDefaultRequest {
...@@ -186,6 +185,7 @@ public class AuthLinkedinRequest extends AuthDefaultRequest { ...@@ -186,6 +185,7 @@ public class AuthLinkedinRequest extends AuthDefaultRequest {
* *
* @param state state 验证授权流程的参数,可以防止csrf * @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址 * @return 返回授权地址
* @since 1.9.3
*/ */
@Override @Override
public String authorize(String state) { public String authorize(String state) {
......
...@@ -18,7 +18,6 @@ import java.text.MessageFormat; ...@@ -18,7 +18,6 @@ import java.text.MessageFormat;
* 小米登录 * 小米登录
* *
* @author yangkai.shen (https://xkcoding.com) * @author yangkai.shen (https://xkcoding.com)
* @version 1.5
* @since 1.5 * @since 1.5
*/ */
@Slf4j @Slf4j
...@@ -113,6 +112,7 @@ public class AuthMiRequest extends AuthDefaultRequest { ...@@ -113,6 +112,7 @@ public class AuthMiRequest extends AuthDefaultRequest {
* *
* @param state state 验证授权流程的参数,可以防止csrf * @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址 * @return 返回授权地址
* @since 1.9.3
*/ */
@Override @Override
public String authorize(String state) { public String authorize(String state) {
......
...@@ -16,7 +16,6 @@ import static me.zhyd.oauth.utils.GlobalAuthUtil.parseQueryToMap; ...@@ -16,7 +16,6 @@ import static me.zhyd.oauth.utils.GlobalAuthUtil.parseQueryToMap;
* 微软登录 * 微软登录
* *
* @author yangkai.shen (https://xkcoding.com) * @author yangkai.shen (https://xkcoding.com)
* @version 1.5
* @since 1.5 * @since 1.5
*/ */
public class AuthMicrosoftRequest extends AuthDefaultRequest { public class AuthMicrosoftRequest extends AuthDefaultRequest {
...@@ -106,6 +105,7 @@ public class AuthMicrosoftRequest extends AuthDefaultRequest { ...@@ -106,6 +105,7 @@ public class AuthMicrosoftRequest extends AuthDefaultRequest {
* *
* @param state state 验证授权流程的参数,可以防止csrf * @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址 * @return 返回授权地址
* @since 1.9.3
*/ */
@Override @Override
public String authorize(String state) { public String authorize(String state) {
......
...@@ -15,7 +15,6 @@ import me.zhyd.oauth.utils.UrlBuilder; ...@@ -15,7 +15,6 @@ import me.zhyd.oauth.utils.UrlBuilder;
* oschina登录 * oschina登录
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthOschinaRequest extends AuthDefaultRequest { public class AuthOschinaRequest extends AuthDefaultRequest {
......
...@@ -19,7 +19,6 @@ import static me.zhyd.oauth.config.AuthSource.PINTEREST; ...@@ -19,7 +19,6 @@ import static me.zhyd.oauth.config.AuthSource.PINTEREST;
* Pinterest登录 * Pinterest登录
* *
* @author hongwei.peng (pengisgood(at)gmail(dot)com) * @author hongwei.peng (pengisgood(at)gmail(dot)com)
* @version 1.9.0
* @since 1.8 * @since 1.8
*/ */
public class AuthPinterestRequest extends AuthDefaultRequest { public class AuthPinterestRequest extends AuthDefaultRequest {
...@@ -74,6 +73,7 @@ public class AuthPinterestRequest extends AuthDefaultRequest { ...@@ -74,6 +73,7 @@ public class AuthPinterestRequest extends AuthDefaultRequest {
* *
* @param state state 验证授权流程的参数,可以防止csrf * @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址 * @return 返回授权地址
* @since 1.9.3
*/ */
@Override @Override
public String authorize(String state) { public String authorize(String state) {
......
...@@ -20,7 +20,6 @@ import java.util.Map; ...@@ -20,7 +20,6 @@ import java.util.Map;
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @author yangkai.shen (https://xkcoding.com) * @author yangkai.shen (https://xkcoding.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthQqRequest extends AuthDefaultRequest { public class AuthQqRequest extends AuthDefaultRequest {
......
...@@ -19,7 +19,6 @@ import static me.zhyd.oauth.model.AuthResponseStatus.SUCCESS; ...@@ -19,7 +19,6 @@ import static me.zhyd.oauth.model.AuthResponseStatus.SUCCESS;
* 人人登录 * 人人登录
* *
* @author hongwei.peng (pengisgood(at)gmail(dot)com) * @author hongwei.peng (pengisgood(at)gmail(dot)com)
* @version 1.9.0
* @since 1.8 * @since 1.8
*/ */
public class AuthRenrenRequest extends AuthDefaultRequest { public class AuthRenrenRequest extends AuthDefaultRequest {
......
...@@ -8,7 +8,6 @@ import me.zhyd.oauth.model.AuthToken; ...@@ -8,7 +8,6 @@ import me.zhyd.oauth.model.AuthToken;
/** /**
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public interface AuthRequest { public interface AuthRequest {
......
...@@ -18,7 +18,6 @@ import static me.zhyd.oauth.utils.GlobalAuthUtil.parseQueryToMap; ...@@ -18,7 +18,6 @@ import static me.zhyd.oauth.utils.GlobalAuthUtil.parseQueryToMap;
* Stack Overflow登录 * Stack Overflow登录
* *
* @author hongwei.peng (pengisgood(at)gmail(dot)com) * @author hongwei.peng (pengisgood(at)gmail(dot)com)
* @version 1.9.0
* @since 1.8 * @since 1.8
*/ */
public class AuthStackOverflowRequest extends AuthDefaultRequest { public class AuthStackOverflowRequest extends AuthDefaultRequest {
...@@ -72,6 +71,7 @@ public class AuthStackOverflowRequest extends AuthDefaultRequest { ...@@ -72,6 +71,7 @@ public class AuthStackOverflowRequest extends AuthDefaultRequest {
* *
* @param state state 验证授权流程的参数,可以防止csrf * @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址 * @return 返回授权地址
* @since 1.9.3
*/ */
@Override @Override
public String authorize(String state) { public String authorize(String state) {
......
...@@ -16,7 +16,6 @@ import me.zhyd.oauth.utils.UrlBuilder; ...@@ -16,7 +16,6 @@ import me.zhyd.oauth.utils.UrlBuilder;
* 淘宝登录 * 淘宝登录
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthTaobaoRequest extends AuthDefaultRequest { public class AuthTaobaoRequest extends AuthDefaultRequest {
...@@ -59,6 +58,7 @@ public class AuthTaobaoRequest extends AuthDefaultRequest { ...@@ -59,6 +58,7 @@ public class AuthTaobaoRequest extends AuthDefaultRequest {
* *
* @param state state 验证授权流程的参数,可以防止csrf * @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址 * @return 返回授权地址
* @since 1.9.3
*/ */
@Override @Override
public String authorize(String state) { public String authorize(String state) {
......
...@@ -13,7 +13,6 @@ import me.zhyd.oauth.model.*; ...@@ -13,7 +13,6 @@ import me.zhyd.oauth.model.*;
* Teambition授权登录 * Teambition授权登录
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthTeambitionRequest extends AuthDefaultRequest { public class AuthTeambitionRequest extends AuthDefaultRequest {
......
...@@ -15,7 +15,6 @@ import me.zhyd.oauth.utils.UrlBuilder; ...@@ -15,7 +15,6 @@ import me.zhyd.oauth.utils.UrlBuilder;
* 腾讯云登录 * 腾讯云登录
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthTencentCloudRequest extends AuthDefaultRequest { public class AuthTencentCloudRequest extends AuthDefaultRequest {
...@@ -75,6 +74,7 @@ public class AuthTencentCloudRequest extends AuthDefaultRequest { ...@@ -75,6 +74,7 @@ public class AuthTencentCloudRequest extends AuthDefaultRequest {
* *
* @param state state 验证授权流程的参数,可以防止csrf * @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址 * @return 返回授权地址
* @since 1.9.3
*/ */
@Override @Override
public String authorize(String state) { public String authorize(String state) {
......
...@@ -16,7 +16,6 @@ import me.zhyd.oauth.utils.UrlBuilder; ...@@ -16,7 +16,6 @@ import me.zhyd.oauth.utils.UrlBuilder;
* 今日头条登录 * 今日头条登录
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.5
* @since 1.5 * @since 1.5
*/ */
public class AuthToutiaoRequest extends AuthDefaultRequest { public class AuthToutiaoRequest extends AuthDefaultRequest {
...@@ -69,6 +68,7 @@ public class AuthToutiaoRequest extends AuthDefaultRequest { ...@@ -69,6 +68,7 @@ public class AuthToutiaoRequest extends AuthDefaultRequest {
* *
* @param state state 验证授权流程的参数,可以防止csrf * @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址 * @return 返回授权地址
* @since 1.9.3
*/ */
@Override @Override
public String authorize(String state) { public String authorize(String state) {
......
...@@ -14,7 +14,6 @@ import me.zhyd.oauth.utils.UrlBuilder; ...@@ -14,7 +14,6 @@ import me.zhyd.oauth.utils.UrlBuilder;
* 微信登录 * 微信登录
* *
* @author yangkai.shen (https://xkcoding.com) * @author yangkai.shen (https://xkcoding.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthWeChatRequest extends AuthDefaultRequest { public class AuthWeChatRequest extends AuthDefaultRequest {
...@@ -104,6 +103,7 @@ public class AuthWeChatRequest extends AuthDefaultRequest { ...@@ -104,6 +103,7 @@ public class AuthWeChatRequest extends AuthDefaultRequest {
* *
* @param state state 验证授权流程的参数,可以防止csrf * @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址 * @return 返回授权地址
* @since 1.9.3
*/ */
@Override @Override
public String authorize(String state) { public String authorize(String state) {
......
...@@ -19,7 +19,6 @@ import me.zhyd.oauth.utils.UrlBuilder; ...@@ -19,7 +19,6 @@ import me.zhyd.oauth.utils.UrlBuilder;
* 微博登录 * 微博登录
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthWeiboRequest extends AuthDefaultRequest { public class AuthWeiboRequest extends AuthDefaultRequest {
...@@ -51,7 +50,7 @@ public class AuthWeiboRequest extends AuthDefaultRequest { ...@@ -51,7 +50,7 @@ public class AuthWeiboRequest extends AuthDefaultRequest {
String oauthParam = String.format("uid=%s&access_token=%s", uid, accessToken); String oauthParam = String.format("uid=%s&access_token=%s", uid, accessToken);
HttpResponse response = HttpRequest.get(userInfoUrl(authToken)) HttpResponse response = HttpRequest.get(userInfoUrl(authToken))
.header("Authorization", "OAuth2 " + oauthParam) .header("Authorization", "OAuth2 " + oauthParam)
.header("API-RemoteIP", IpUtils.getIp()) .header("API-RemoteIP", IpUtils.getLocalIp())
.execute(); .execute();
String userInfo = response.body(); String userInfo = response.body();
JSONObject object = JSONObject.parseObject(userInfo); JSONObject object = JSONObject.parseObject(userInfo);
......
...@@ -9,7 +9,6 @@ import me.zhyd.oauth.model.AuthResponseStatus; ...@@ -9,7 +9,6 @@ import me.zhyd.oauth.model.AuthResponseStatus;
* 授权配置类的校验器 * 授权配置类的校验器
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthChecker { public class AuthChecker {
......
...@@ -21,7 +21,6 @@ import java.util.*; ...@@ -21,7 +21,6 @@ import java.util.*;
* 全局的工具类 * 全局的工具类
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class GlobalAuthUtil { public class GlobalAuthUtil {
......
...@@ -7,7 +7,6 @@ import java.net.UnknownHostException; ...@@ -7,7 +7,6 @@ import java.net.UnknownHostException;
* 获取IP的工具类 * 获取IP的工具类
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.0 * @since 1.0
*/ */
public class IpUtils { public class IpUtils {
...@@ -17,7 +16,7 @@ public class IpUtils { ...@@ -17,7 +16,7 @@ public class IpUtils {
* *
* @return ip * @return ip
*/ */
public static String getIp() { public static String getLocalIp() {
try { try {
return InetAddress.getLocalHost().getHostAddress(); return InetAddress.getLocalHost().getHostAddress();
} catch (UnknownHostException e) { } catch (UnknownHostException e) {
......
...@@ -14,7 +14,6 @@ import java.util.Map; ...@@ -14,7 +14,6 @@ import java.util.Map;
* </p> * </p>
* *
* @author yangkai.shen (https://xkcoding.com) * @author yangkai.shen (https://xkcoding.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
@Setter @Setter
......
...@@ -8,7 +8,6 @@ import org.junit.Test; ...@@ -8,7 +8,6 @@ import org.junit.Test;
/** /**
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.8 * @since 1.8
*/ */
public class AuthRequestTest { public class AuthRequestTest {
......
...@@ -13,9 +13,6 @@ import java.util.Map; ...@@ -13,9 +13,6 @@ import java.util.Map;
/** /**
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @website https://www.zhyd.me
* @date 2019/7/19 15:52
* @since 1.8 * @since 1.8
*/ */
public class CustomTest { public class CustomTest {
......
### 2019/07/27
1. `IpUtils.getIp`改名为`IpUtils.getLocalIp`
2. 规范注释
### 2019/07/25 ### 2019/07/25
1. `AuthConfig`类中去掉state参数 1. `AuthConfig`类中去掉state参数
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册