|
@@ -15,7 +15,6 @@ import com.chelvc.framework.redis.context.RedisContextHolder;
|
|
import com.chelvc.framework.redis.context.RedisHashHolder;
|
|
import com.chelvc.framework.redis.context.RedisHashHolder;
|
|
import com.chelvc.framework.redis.context.RedisUserDailyHashHolder;
|
|
import com.chelvc.framework.redis.context.RedisUserDailyHashHolder;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
-import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
@@ -32,7 +31,6 @@ import org.springframework.stereotype.Component;
|
|
* @author Woody
|
|
* @author Woody
|
|
* @date 2024/1/30
|
|
* @date 2024/1/30
|
|
*/
|
|
*/
|
|
-@Slf4j
|
|
|
|
@Component
|
|
@Component
|
|
@ConditionalOnClass(RedisContextHolder.class)
|
|
@ConditionalOnClass(RedisContextHolder.class)
|
|
@ConditionalOnProperty(value = "oauth.redis.enabled", havingValue = "true", matchIfMissing = true)
|
|
@ConditionalOnProperty(value = "oauth.redis.enabled", havingValue = "true", matchIfMissing = true)
|
|
@@ -57,10 +55,6 @@ public class RedisSessionValidator extends DefaultSessionValidator {
|
|
|
|
|
|
// 校验令牌有效性及应用范围
|
|
// 校验令牌有效性及应用范围
|
|
String token = ObjectUtils.get(values, 0), scope = this.getScope(jwt);
|
|
String token = ObjectUtils.get(values, 0), scope = this.getScope(jwt);
|
|
- if (StringUtils.isEmpty(token)) {
|
|
|
|
- // 兼容框架1.0版本
|
|
|
|
- token = (String) template.opsForValue().get("token:" + terminal + ":" + id);
|
|
|
|
- }
|
|
|
|
if (StringUtils.isEmpty(token)) {
|
|
if (StringUtils.isEmpty(token)) {
|
|
throw new OAuth2AuthenticationException(new OAuth2Error(
|
|
throw new OAuth2AuthenticationException(new OAuth2Error(
|
|
"TOKEN_EXPIRED", ApplicationContextHolder.getMessage("Token.Expired"), null
|
|
"TOKEN_EXPIRED", ApplicationContextHolder.getMessage("Token.Expired"), null
|