v1.14.0 更新

This commit is contained in:
shengzhang
2021-03-12 01:45:13 +08:00
parent 9fe0e1f97b
commit f9ad71db66
28 changed files with 73 additions and 36 deletions

View File

@@ -9,3 +9,4 @@ sa-token-oauth2 模块是 sa-token 实现 oauth2.0 的部分,目前该模块
3. 根据控制台打印,访问测试地址即可:[http://localhost:8002/login.html](http://localhost:8002/login.html)
可结合代码注释学习查看

View File

@@ -7,13 +7,13 @@
<parent>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-parent</artifactId>
<version>1.13.0</version>
<version>1.14.0</version>
</parent>
<packaging>jar</packaging>
<name>sa-token-dao-redis</name>
<artifactId>sa-token-oauth2</artifactId>
<version>1.13.0-alpha</version>
<version>1.14.0-alpha</version>
<description>sa-token realization oauth2.0</description>
<dependencies>

View File

@@ -523,7 +523,7 @@ public interface SaOAuth2Interface {
}
/**
* 获取key[Client&账号]最新授权码记录, 持久化使用的key
* 获取key[Client and 账号]最新授权码记录, 持久化使用的key
* @param loginId 账号id
* @param clientId 应用id
* @return key

View File

@@ -51,6 +51,7 @@ public class SaOAuth2Util {
* @param clientId 应用id
* @param scope 权限
* @param loginId 账号id
* @return 是否已经授权
*/
public static boolean isGrant(Object loginId, String clientId, String scope) {
return SaOAuth2Manager.getInterface().isGrant(loginId, clientId, scope);

View File

@@ -50,6 +50,7 @@ public class RequestAuthModel {
/**
* @param clientId 要设置的 clientId
* @return 对象自身
*/
public RequestAuthModel setClientId(String clientId) {
this.clientId = clientId;
@@ -65,6 +66,7 @@ public class RequestAuthModel {
/**
* @param scope 要设置的 scope
* @return 对象自身
*/
public RequestAuthModel setScope(String scope) {
this.scope = scope;
@@ -80,6 +82,7 @@ public class RequestAuthModel {
/**
* @param loginId 要设置的 loginId
* @return 对象自身
*/
public RequestAuthModel setLoginId(Object loginId) {
this.loginId = loginId;
@@ -95,6 +98,7 @@ public class RequestAuthModel {
/**
* @param redirectUri 要设置的 redirectUri
* @return 对象自身
*/
public RequestAuthModel setRedirectUri(String redirectUri) {
this.redirectUri = redirectUri;
@@ -110,6 +114,7 @@ public class RequestAuthModel {
/**
* @param responseType 要设置的 responseType
* @return 对象自身
*/
public RequestAuthModel setResponseType(String responseType) {
this.responseType = responseType;
@@ -125,6 +130,7 @@ public class RequestAuthModel {
/**
* @param state 要设置的 state
* @return 对象自身
*/
public RequestAuthModel setState(String state) {
this.state = state;
@@ -133,6 +139,7 @@ public class RequestAuthModel {
/**
* 检查此Model参数是否有效
* @return 对象自身
*/
public RequestAuthModel checkModel() {
if(SaTokenInsideUtil.isEmpty(clientId)) {

View File

@@ -26,7 +26,7 @@ public class ScopeModel {
}
/**
* 构造一个
* @param id 权限id
* @param name 权限名称
* @param introduce 权限详细介绍
*/
public ScopeModel(String name, String introduce) {