mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-06-28 13:34:18 +08:00
Merge branch 'dev' of https://gitee.com/dromara/sa-token into dev
This commit is contained in:
commit
923b76a8db
@ -21,6 +21,8 @@ import cn.dev33.satoken.oauth2.error.SaOAuth2ErrorCode;
|
|||||||
import cn.dev33.satoken.oauth2.exception.SaOAuth2ClientModelException;
|
import cn.dev33.satoken.oauth2.exception.SaOAuth2ClientModelException;
|
||||||
import cn.dev33.satoken.secure.SaSecureUtil;
|
import cn.dev33.satoken.secure.SaSecureUtil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sa-Token OAuth2 数据加载器
|
* Sa-Token OAuth2 数据加载器
|
||||||
*
|
*
|
||||||
@ -78,4 +80,21 @@ public interface SaOAuth2DataLoader {
|
|||||||
return SaSecureUtil.md5(SaOAuth2Manager.getServerConfig().getUnionidDigestPrefix() + "_" + subjectId + "_" + loginId);
|
return SaSecureUtil.md5(SaOAuth2Manager.getServerConfig().getUnionidDigestPrefix() + "_" + subjectId + "_" + loginId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取高级权限列表
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
default List<String> getHigherScopeList() {
|
||||||
|
String higherScope = SaOAuth2Manager.getServerConfig().getHigherScope();
|
||||||
|
return SaOAuth2Manager.getDataConverter().convertScopeStringToList(higherScope);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取低级权限列表
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
default List<String> getLowerScopeList() {
|
||||||
|
String lowerScope = SaOAuth2Manager.getServerConfig().getLowerScope();
|
||||||
|
return SaOAuth2Manager.getDataConverter().convertScopeStringToList(lowerScope);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -765,8 +765,7 @@ public class SaOAuth2Template {
|
|||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
public List<String> getHigherScopeList() {
|
public List<String> getHigherScopeList() {
|
||||||
String higherScope = SaOAuth2Manager.getServerConfig().getHigherScope();
|
return SaOAuth2Manager.getDataLoader().getHigherScopeList();
|
||||||
return SaOAuth2Manager.getDataConverter().convertScopeStringToList(higherScope);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -774,8 +773,7 @@ public class SaOAuth2Template {
|
|||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
public List<String> getLowerScopeList() {
|
public List<String> getLowerScopeList() {
|
||||||
String lowerScope = SaOAuth2Manager.getServerConfig().getLowerScope();
|
return SaOAuth2Manager.getDataLoader().getLowerScopeList();
|
||||||
return SaOAuth2Manager.getDataConverter().convertScopeStringToList(lowerScope);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user