bugfix@JwtVerify

This commit is contained in:
高子兴 2024-07-03 14:12:42 +08:00
parent df6686fc19
commit fc2c97b502

View File

@ -8,7 +8,7 @@ import org.springframework.stereotype.Component;
@Aspect
@Component
public class JwtVerifyAspect {
@Before("@annotation(JwtVerify)")
@Before("@annotation(JwtVerify)&&args(..)")
public void verifyJwtToken(JoinPoint joinPoint) throws JwtValidationException {
Object[] args = joinPoint.getArgs();
for (Object arg : args) {
@ -17,8 +17,8 @@ public class JwtVerifyAspect {
if (!JwtUtil.isTokenValid(token)) {
throw new JwtValidationException("JWT token is invalid");
}
break;
}
break;
}
}
}