forked from RyanGoodwill/backend
bugfix@JwtVerify
This commit is contained in:
parent
3a7b6ee605
commit
c4f0b2348f
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user