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

🍻 规范代码注释

上级 fabfff60
...@@ -4,9 +4,7 @@ package me.zhyd.oauth.cache; ...@@ -4,9 +4,7 @@ package me.zhyd.oauth.cache;
* AuthCache配置类 * AuthCache配置类
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0 * @since 1.9.6
* @date 2019/8/1 17:15
* @since 1.8
*/ */
public class AuthCacheConfig { public class AuthCacheConfig {
......
package me.zhyd.oauth.cache; package me.zhyd.oauth.cache;
/** /**
* 默认的state缓存实现
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0 * @since 1.9.6
* @since 1.8
*/ */
public enum AuthDefaultStateCache implements AuthStateCache { public enum AuthDefaultStateCache implements AuthStateCache {
......
...@@ -6,7 +6,7 @@ package me.zhyd.oauth.cache; ...@@ -6,7 +6,7 @@ package me.zhyd.oauth.cache;
* </p> * </p>
* *
* @author yangkai.shen * @author yangkai.shen
* @date Created in 2019-08-02 10:55 * @since 1.9.6
*/ */
public interface AuthStateCache { public interface AuthStateCache {
/** /**
......
...@@ -11,15 +11,13 @@ import java.time.format.DateTimeFormatter; ...@@ -11,15 +11,13 @@ import java.time.format.DateTimeFormatter;
* 针对JustAuth提供的轻量级的日志打印工具 * 针对JustAuth提供的轻量级的日志打印工具
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @date 2019/8/1 17:14
* @see Log#debug(String) * @see Log#debug(String)
* @see Log#debug(String, Throwable) * @see Log#debug(String, Throwable)
* @see Log#warn(String) * @see Log#warn(String)
* @see Log#warn(String, Throwable) * @see Log#warn(String, Throwable)
* @see Log#error(String) * @see Log#error(String)
* @see Log#error(String, Throwable) * @see Log#error(String, Throwable)
* @since 1.8 * @since 1.9.6
*/ */
public class Log { public class Log {
...@@ -111,9 +109,7 @@ public class Log { ...@@ -111,9 +109,7 @@ public class Log {
* 日志级别 * 日志级别
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0 * @since 1.9.6
* @date 2019/8/2 19:49
* @since 1.8
*/ */
@Getter @Getter
@AllArgsConstructor @AllArgsConstructor
...@@ -138,9 +134,7 @@ public class Log { ...@@ -138,9 +134,7 @@ public class Log {
* 日志配置 * 日志配置
* *
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0 * @since 1.9.6
* @date 2019/8/1 17:14
* @since 1.8
*/ */
static class Config { static class Config {
......
...@@ -2,7 +2,6 @@ package me.zhyd.oauth.request; ...@@ -2,7 +2,6 @@ package me.zhyd.oauth.request;
import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse; import cn.hutool.http.HttpResponse;
import lombok.extern.slf4j.Slf4j;
import me.zhyd.oauth.cache.AuthDefaultStateCache; import me.zhyd.oauth.cache.AuthDefaultStateCache;
import me.zhyd.oauth.cache.AuthStateCache; import me.zhyd.oauth.cache.AuthStateCache;
import me.zhyd.oauth.config.AuthConfig; import me.zhyd.oauth.config.AuthConfig;
...@@ -158,12 +157,12 @@ public abstract class AuthDefaultRequest implements AuthRequest { ...@@ -158,12 +157,12 @@ public abstract class AuthDefaultRequest implements AuthRequest {
protected String refreshTokenUrl(String refreshToken) { protected String refreshTokenUrl(String refreshToken) {
return UrlBuilder.fromBaseUrl(source.refresh()) return UrlBuilder.fromBaseUrl(source.refresh())
.queryParam("client_id", config.getClientId()) .queryParam("client_id", config.getClientId())
.queryParam("client_secret", config.getClientSecret()) .queryParam("client_secret", config.getClientSecret())
.queryParam("refresh_token", refreshToken) .queryParam("refresh_token", refreshToken)
.queryParam("grant_type", "refresh_token") .queryParam("grant_type", "refresh_token")
.queryParam("redirect_uri", config.getRedirectUri()) .queryParam("redirect_uri", config.getRedirectUri())
.build(); .build();
} }
/** /**
* 返回获取userInfo的url * 返回获取userInfo的url
......
...@@ -11,7 +11,10 @@ import me.zhyd.oauth.enums.AuthResponseStatus; ...@@ -11,7 +11,10 @@ import me.zhyd.oauth.enums.AuthResponseStatus;
import me.zhyd.oauth.enums.AuthUserGender; import me.zhyd.oauth.enums.AuthUserGender;
import me.zhyd.oauth.exception.AuthException; import me.zhyd.oauth.exception.AuthException;
import me.zhyd.oauth.log.Log; import me.zhyd.oauth.log.Log;
import me.zhyd.oauth.model.*; import me.zhyd.oauth.model.AuthCallback;
import me.zhyd.oauth.model.AuthResponse;
import me.zhyd.oauth.model.AuthToken;
import me.zhyd.oauth.model.AuthUser;
import me.zhyd.oauth.utils.UrlBuilder; import me.zhyd.oauth.utils.UrlBuilder;
import java.text.MessageFormat; import java.text.MessageFormat;
......
package me.zhyd.oauth.utils; package me.zhyd.oauth.utils;
import me.zhyd.oauth.cache.AuthStateCache;
import me.zhyd.oauth.config.AuthConfig; import me.zhyd.oauth.config.AuthConfig;
import me.zhyd.oauth.config.AuthSource; import me.zhyd.oauth.config.AuthSource;
import me.zhyd.oauth.enums.AuthResponseStatus; import me.zhyd.oauth.enums.AuthResponseStatus;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册