Hi, I followed your code to implement JWT based authentication. However I got the following error for the line "JWTToken jwtToken = (JWTToken) authentication" in JWTAuthenticationProvider:
java.lang.ClassCastException: org.springframework.security.authentication.UsernamePasswordAuthenticationToken cannot be cast to org.mdacc.rists.ristore.ws.security.jwt.JWTToken
I got this error when I submit the login form created with AngularJS. Post request with user credentials to "http://localhost:8080/login" ends up with 505 (Internal Server Error). Why am I getting this error?
Hi, I followed your code to implement JWT based authentication. However I got the following error for the line "JWTToken jwtToken = (JWTToken) authentication" in JWTAuthenticationProvider:
java.lang.ClassCastException: org.springframework.security.authentication.UsernamePasswordAuthenticationToken cannot be cast to org.mdacc.rists.ristore.ws.security.jwt.JWTToken
My detailed code can be found here
JWTAuthenticationFilter is added my web security config in Spring Boot:
I got this error when I submit the login form created with AngularJS. Post request with user credentials to "http://localhost:8080/login" ends up with 505 (Internal Server Error). Why am I getting this error?