polymer-spring-boot
polymer-spring-boot copied to clipboard
Shouldnt the calling sequence of the addFilterBefore be changed.
.addFilterBefore(new TokenAuthFilter(tokenAuthService), UsernamePasswordAuthenticationFilter.class) .addFilterBefore(new LoginFilter("/auth/login", authenticationManager(), tokenAuthService), UsernamePasswordAuthenticationFilter.class);
Should be -
.addFilterBefore(new LoginFilter("/auth/login", authenticationManager(), tokenAuthService), UsernamePasswordAuthenticationFilter.class); .addFilterBefore(new TokenAuthFilter(tokenAuthService), UsernamePasswordAuthenticationFilter.class)
Yes, I you're right. Can you please make a pull request?
Sure I will send one..later.
Thanks
I did a build and ran on local. It worked fine with the way it is. I dont think it needs a change but for some reason I feel if "/auth/login" filter is not loaded first then we might run into a null pointer exception in getAuthentication()... I will not change since it works the way it is.
Thanks.