bugfix@JwtVerify

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

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,9 +17,9 @@ public class JwtVerifyAspect {
if (!JwtUtil.isTokenValid(token)) {
throw new JwtValidationException("JWT token is invalid");
}
}
break;
}
}
}
}