实现管理后台登录时,使用 OAuth2 的 access token

This commit is contained in:
YunaiV
2022-05-08 23:52:31 +08:00
parent ebee4ddb7c
commit 4f52d1367b
30 changed files with 626 additions and 357 deletions

View File

@ -84,8 +84,8 @@ public class WebFrameworkUtils {
}
// 1. 优先,从 Attribute 中获取
Integer userType = (Integer) request.getAttribute(REQUEST_ATTRIBUTE_LOGIN_USER_TYPE);
if (userType == null) {
return null;
if (userType != null) {
return userType;
}
// 2. 其次,基于 URL 前缀的约定
if (request.getRequestURI().startsWith(properties.getAdminApi().getPrefix())) {