diff --git a/src/main/java/com/ddf/vodsystem/security/JwtService.java b/src/main/java/com/ddf/vodsystem/security/JwtService.java index df2a05e..e5b863f 100644 --- a/src/main/java/com/ddf/vodsystem/security/JwtService.java +++ b/src/main/java/com/ddf/vodsystem/security/JwtService.java @@ -4,12 +4,9 @@ import java.util.Date; import com.auth0.jwt.JWT; import com.auth0.jwt.JWTVerifier; import com.auth0.jwt.algorithms.Algorithm; -import com.auth0.jwt.exceptions.JWTDecodeException; -import com.auth0.jwt.exceptions.TokenExpiredException; +import com.auth0.jwt.exceptions.JWTVerificationException; import com.auth0.jwt.interfaces.DecodedJWT; import com.ddf.vodsystem.dto.properties.AuthProperties; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.security.oauth2.jwt.JwtException; import org.springframework.stereotype.Service; @Service @@ -60,7 +57,7 @@ public class JwtService { } return jwt.getClaim(USER_ID_CLAIM).asLong(); - } catch (JwtException | IllegalArgumentException | TokenExpiredException | JWTDecodeException ignored) { + } catch (JWTVerificationException | IllegalArgumentException ignored) { return null; } }