I have used form-login and login success in Spring security 4.2.
Then client will send cookie to server next time , and i want add a custom filter to verify url parameter value with cookie from client . when cookie value is not valid with url parameter value, redirect to login page.
I have tried to extend AbstractAuthenticationProcessingFilter , but i don't know how to add filter in http-sercurity (add fileter before or after ?), and how to redirect to login page(because i want redirect to original page after success login).
Update: I can get cookie from controller ,redirect to login page when cookie is not valid . But it will not redirect to original page after success login ,because i use spring security to login and request cache in SavedRequestAwareAuthenticationSuccessHandler is null , so i want add filter to do this in spring security