mirror of
https://github.com/201206030/novel.git
synced 2025-04-27 07:30:50 +00:00
fix: token 判空
This commit is contained in:
parent
cd8c937584
commit
ee449134d0
@ -6,6 +6,7 @@ import io.github.xxyopen.novel.core.constant.SystemConfigConsts;
|
||||
import io.github.xxyopen.novel.core.util.JwtUtils;
|
||||
import io.github.xxyopen.novel.dto.UserInfoDto;
|
||||
import io.github.xxyopen.novel.manager.UserInfoCacheManager;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@ -29,13 +30,13 @@ public interface AuthStrategy {
|
||||
/**
|
||||
* 前台多系统单点登录统一账号认证(门户系统、作家系统以及后面会扩展的漫画系统和视频系统等)
|
||||
*
|
||||
* @param jwtUtils jwt 工具
|
||||
* @param jwtUtils jwt 工具
|
||||
* @param userInfoCacheManager 用户缓存管理对象
|
||||
* @param token token 登录 token
|
||||
* @param token token 登录 token
|
||||
* @return 用户ID
|
||||
*/
|
||||
default Long authSSO(JwtUtils jwtUtils, UserInfoCacheManager userInfoCacheManager, String token) {
|
||||
if (Objects.isNull(token)) {
|
||||
if (!StringUtils.hasText(token)) {
|
||||
// token 为空
|
||||
throw new BusinessException(ErrorCodeEnum.USER_LOGIN_EXPIRED);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user