I\'m following this auth0\'s tutorial to secure my application using JWT.
I\'ve ended up with the following WebSecurity configuration:
@EnableWebSecu
A little improvement could be to just create your filter with custom process url and use it without create a bean that I think you don't need anywhere else than here.
JWTAuthenticationFilter authenticationFilter = new JWTAuthenticationFilter(authenticationManager());
authenticationFilter.setFilterProcessesUrl("/mobile/login");
....
.and()
.addFilter(authenticationFilter)
.addFilter(new JWTAuthenticationFilter(authenticationManager()))