Olá Tenho uma dúvida, estou tendo erro 500 "Token JWT inválido ou expirado!", ao enviar a requisição na "Listagem de Médicos" mesmo eu tendo o Token diretamente no cabeçalho. Trecho do erro:
2023-07-10T14:53:08.666-03:00 ERROR 10468 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception
java.lang.RuntimeException: Token JWT inválido ou expirado!
at med.voll.api.infra.security.TokenService.getSubject(TokenService.java:43) ~[classes/:na]
at med.voll.api.infra.security.SecurityFilter.doFilterInternal(SecurityFilter.java:23) ~[classes/:na]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.7.jar:6.0.7]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.7.jar:10.1.7]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.7.jar:10.1.7]
at org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231) ~[spring-security-web-6.1.0-M2.jar:6.1.0-M2]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:365) ~[spring-security-web-6.1.0-M2.jar:6.1.0-M2]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126) ~[spring-security-web-6.1.0-M2.jar:6.1.0-M2]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120) ~[spring-security-web-6.1.0-M2.jar:6.1.0-M2]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.0-M2.jar:6.1.0-M2]