优化 sa-token-oauth2 模块注释

This commit is contained in:
click33 2023-05-12 18:40:08 +08:00
parent c27cf376e7
commit 5173c2637b
14 changed files with 60 additions and 48 deletions

View File

@ -6,7 +6,7 @@ import cn.dev33.satoken.oauth2.config.SaOAuth2Config;
* Sa-Token-OAuth2 模块 总控类
*
* @author click33
*
* @since <= 1.34.0
*/
public class SaOAuth2Manager {

View File

@ -7,9 +7,10 @@ import java.util.function.BiFunction;
import java.util.function.Supplier;
/**
* Sa-Token-OAuth2 配置类 Model
* @author click33
* Sa-Token-OAuth2 配置类 Model
*
* @author click33
* @since <= 1.34.0
*/
public class SaOAuth2Config implements Serializable {

View File

@ -4,95 +4,95 @@ package cn.dev33.satoken.oauth2.error;
* 定义 sa-token-oauth2 所有异常细分状态码
*
* @author click33
* @since: 2022-10-31
* @since 2022-10-31
*/
public interface SaOAuth2ErrorCode {
/** client_id 不可为空 */
public static final int CODE_30101 = 30101;
int CODE_30101 = 30101;
/** scope 不可为空 */
public static final int CODE_30102 = 30102;
int CODE_30102 = 30102;
/** redirect_uri 不可为空 */
public static final int CODE_30103 = 30103;
int CODE_30103 = 30103;
/** LoginId 不可为空 */
public static final int CODE_30104 = 30104;
int CODE_30104 = 30104;
/** 无效client_id */
public static final int CODE_30105 = 30105;
int CODE_30105 = 30105;
/** 无效access_token */
public static final int CODE_30106 = 30106;
int CODE_30106 = 30106;
/** 无效 client_token */
public static final int CODE_30107 = 30107;
int CODE_30107 = 30107;
/** Access-Token 不具备指定的 Scope */
public static final int CODE_30108 = 30108;
int CODE_30108 = 30108;
/** Client-Token 不具备指定的 Scope */
public static final int CODE_30109 = 30109;
int CODE_30109 = 30109;
/** 无效 code 码 */
public static final int CODE_30110 = 30110;
int CODE_30110 = 30110;
/** 无效 Refresh-Token */
public static final int CODE_30111 = 30111;
int CODE_30111 = 30111;
/** 请求的Scope暂未签约 */
public static final int CODE_30112 = 30112;
int CODE_30112 = 30112;
/** 无效redirect_url */
public static final int CODE_30113 = 30113;
int CODE_30113 = 30113;
/** 非法redirect_url */
public static final int CODE_30114 = 30114;
int CODE_30114 = 30114;
/** 无效client_secret */
public static final int CODE_30115 = 30115;
int CODE_30115 = 30115;
/** 请求的Scope暂未签约 */
public static final int CODE_30116 = 30116;
int CODE_30116 = 30116;
/** 无效code */
public static final int CODE_30117 = 30117;
int CODE_30117 = 30117;
/** 无效client_id */
public static final int CODE_30118 = 30118;
int CODE_30118 = 30118;
/** 无效client_secret */
public static final int CODE_30119 = 30119;
int CODE_30119 = 30119;
/** 无效redirect_uri */
public static final int CODE_30120 = 30120;
int CODE_30120 = 30120;
/** 无效refresh_token */
public static final int CODE_30121 = 30121;
int CODE_30121 = 30121;
/** 无效client_id */
public static final int CODE_30122 = 30122;
int CODE_30122 = 30122;
/** 无效client_secret */
public static final int CODE_30123 = 30123;
int CODE_30123 = 30123;
/** 无效client_id */
public static final int CODE_30124 = 30124;
int CODE_30124 = 30124;
/** 无效response_type */
public static final int CODE_30125 = 30125;
int CODE_30125 = 30125;
/** 暂未开放授权码模式 */
public static final int CODE_30131 = 30131;
int CODE_30131 = 30131;
/** 暂未开放隐藏式模式 */
public static final int CODE_30132 = 30132;
int CODE_30132 = 30132;
/** 暂未开放密码式模式 */
public static final int CODE_30133 = 30133;
int CODE_30133 = 30133;
/** 暂未开放凭证式模式 */
public static final int CODE_30134 = 30134;
int CODE_30134 = 30134;
}

View File

@ -6,6 +6,7 @@ import cn.dev33.satoken.exception.SaTokenException;
* 一个异常代表OAuth2认证流程错误
*
* @author click33
* @since <= 1.34.0
*/
public class SaOAuth2Exception extends SaTokenException {

View File

@ -1,9 +1,10 @@
package cn.dev33.satoken.oauth2.logic;
/**
* Sa-Token-OAuth2 所有常量
* @author click33
* Sa-Token-OAuth2 所有常量
*
* @author click33
* @since <= 1.34.0
*/
public class SaOAuth2Consts {

View File

@ -21,8 +21,9 @@ import cn.dev33.satoken.util.SaResult;
/**
* Sa-Token-OAuth2 请求处理类封装
* @author click33
*
* @author click33
* @since <= 1.34.0
*/
public class SaOAuth2Handle {

View File

@ -19,8 +19,9 @@ import cn.dev33.satoken.util.SaFoxUtil;
/**
* Sa-Token-OAuth2 模块 代码实现
* @author click33
*
* @author click33
* @since <= 1.34.0
*/
public class SaOAuth2Template {

View File

@ -9,9 +9,10 @@ import cn.dev33.satoken.oauth2.model.RequestAuthModel;
import cn.dev33.satoken.oauth2.model.SaClientModel;
/**
* Sa-Token-OAuth2 模块 工具类
* Sa-Token-OAuth2 模块 工具类
*
* @author click33
*
* @since <= 1.34.0
*/
public class SaOAuth2Util {

View File

@ -6,8 +6,9 @@ import java.util.Map;
/**
* Model: Access-Token
* @author click33
*
* @author click33
* @since <= 1.34.0
*/
public class AccessTokenModel implements Serializable {

View File

@ -6,8 +6,9 @@ import java.util.Map;
/**
* Model: Client-Token
* @author click33
*
* @author click33
* @since <= 1.34.0
*/
public class ClientTokenModel implements Serializable {

View File

@ -3,9 +3,10 @@ package cn.dev33.satoken.oauth2.model;
import java.io.Serializable;
/**
* Model: 授权码
* @author click33
* Model: 授权码
*
* @author click33
* @since <= 1.34.0
*/
public class CodeModel implements Serializable {

View File

@ -3,9 +3,10 @@ package cn.dev33.satoken.oauth2.model;
import java.io.Serializable;
/**
* Model: Refresh-Token
* @author click33
* Model: Refresh-Token
*
* @author click33
* @since <= 1.34.0
*/
public class RefreshTokenModel implements Serializable {

View File

@ -8,8 +8,9 @@ import cn.dev33.satoken.util.SaFoxUtil;
/**
* 请求授权参数的Model
* @author click33
*
* @author click33
* @since <= 1.34.0
*/
public class RequestAuthModel implements Serializable {

View File

@ -6,9 +6,10 @@ import cn.dev33.satoken.oauth2.SaOAuth2Manager;
import cn.dev33.satoken.oauth2.config.SaOAuth2Config;
/**
* Client应用信息 Model
* @author click33
* Client应用信息 Model
*
* @author click33
* @since <= 1.34.0
*/
public class SaClientModel implements Serializable {