vityaman-edu / lms

A simple learning management system.
Apache License 2.0
4 stars 0 forks source link

Fix error when JWT was expired #146

Closed vityaman closed 1 month ago

vityaman commented 1 month ago
botalka-1         | 2024-06-14T10:25:14.139Z ERROR 1 --- [botalka] [atcher-worker-2] a.w.r.e.AbstractErrorWebExceptionHandler : [86494033-67]  500 Server Error for HTTP POST "/api/v1/homework"
botalka-1         | 
botalka-1         | io.jsonwebtoken.ExpiredJwtException: JWT expired 594115 milliseconds ago at 2024-06-14T10:15:20.000Z. Current time: 2024-06-14T10:25:14.115Z. Allowed clock skew: 0 milliseconds.
botalka-1         |     at io.jsonwebtoken.impl.DefaultJwtParser.parse(DefaultJwtParser.java:682) ~[jjwt-impl-0.12.5.jar!/:0.12.5]
botalka-1         |     Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
botalka-1         | Error has been observed at the following site(s):
botalka-1         |     *__checkpoint ⇢ AuthorizationWebFilter [DefaultWebFilterChain]
botalka-1         |     *__checkpoint ⇢ ExceptionTranslationWebFilter [DefaultWebFilterChain]
botalka-1         |     *__checkpoint ⇢ LogoutWebFilter [DefaultWebFilterChain]
botalka-1         |     *__checkpoint ⇢ ServerRequestCacheWebFilter [DefaultWebFilterChain]
botalka-1         |     *__checkpoint ⇢ SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
botalka-1         |     *__checkpoint ⇢ ReactorContextWebFilter [DefaultWebFilterChain]
botalka-1         |     *__checkpoint ⇢ HttpHeaderWriterWebFilter [DefaultWebFilterChain]
botalka-1         |     *__checkpoint ⇢ ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
botalka-1         |     *__checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
botalka-1         |     *__checkpoint ⇢ HTTP POST "/api/v1/homework" [ExceptionHandlingWebHandler]
botalka-1         | Original Stack Trace:
botalka-1         |             at io.jsonwebtoken.impl.DefaultJwtParser.parse(DefaultJwtParser.java:682) ~[jjwt-impl-0.12.5.jar!/:0.12.5]
botalka-1         |             at io.jsonwebtoken.impl.DefaultJwtParser.parse(DefaultJwtParser.java:362) ~[jjwt-impl-0.12.5.jar!/:0.12.5]
botalka-1         |             at io.jsonwebtoken.impl.DefaultJwtParser.parse(DefaultJwtParser.java:94) ~[jjwt-impl-0.12.5.jar!/:0.12.5]
botalka-1         |             at io.jsonwebtoken.impl.io.AbstractParser.parse(AbstractParser.java:36) ~[jjwt-impl-0.12.5.jar!/:0.12.5]
botalka-1         |             at io.jsonwebtoken.impl.io.AbstractParser.parse(AbstractParser.java:29) ~[jjwt-impl-0.12.5.jar!/:0.12.5]
botalka-1         |             at io.jsonwebtoken.impl.DefaultJwtParser.parseSignedClaims(DefaultJwtParser.java:821) ~[jjwt-impl-0.12.5.jar!/:0.12.5]
botalka-1         |             at ru.vityaman.lms.botalka.core.security.auth.JwtTokenService.decode-kMsid1A(JwtTokenService.kt:42) ~[!/:0.0.1]
botalka-1         |             at ru.vityaman.lms.botalka.core.security.auth.LoggingTokenService.decode-kMsid1A(LoggingTokenService.kt:21) ~[!/:0.0.1]
botalka-1         |             at ru.vityaman.lms.botalka.app.spring.security.SpringTokenService.decode-kMsid1A(SpringTokenService.kt) ~[!/:0.0.1]
botalka-1         |             at ru.vityaman.lms.botalka.app.spring.security.SpringJwtAuthManager.doAuthenticate(SpringJwtAuthManager.kt:33) ~[!/:0.0.1]
botalka-1         |             at ru.vityaman.lms.botalka.app.spring.security.SpringJwtAuthManager.access$doAuthenticate(SpringJwtAuthManager.kt:15) ~[!/:0.0.1]
botalka-1         |             at ru.vityaman.lms.botalka.app.spring.security.SpringJwtAuthManager$authenticate$1.invokeSuspend(SpringJwtAuthManager.kt:22) ~[!/:0.0.1]
botalka-1         |             at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) ~[kotlin-stdlib-1.9.22.jar!/:1.9.22-release-704]
botalka-1         |             at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) ~[kotlinx-coroutines-core-jvm-1.7.3.jar!/:na]
botalka-1         |             at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) ~[kotlinx-coroutines-core-jvm-1.7.3.jar!/:na]
botalka-1         |             at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793) ~[kotlinx-coroutines-core-jvm-1.7.3.jar!/:na]
botalka-1         |             at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697) ~[kotlinx-coroutines-core-jvm-1.7.3.jar!/:na]
botalka-1         |             at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684) ~[kotlinx-coroutines-core-jvm-1.7.3.jar!/:na]
botalka-1         |