-
Notifications
You must be signed in to change notification settings - Fork 41
Description
When I send a request POST to http://localhost:8080/api/auth/refresh, I got error in class AuthenticationResource, method refresh() in line 70:
AuthenticationTokenDetails tokenDetails = ((TokenBasedSecurityContext) securityContext).getAuthenticationTokenDetails();
javax.servlet.ServletException: java.lang.ClassCastException: org.glassfish.jersey.server.internal.process.SecurityContextInjectee cannot be cast to com.cassiomolin.example.security.api.TokenBasedSecurityContext
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:489)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
...