Spring Security - Dispatch to /j_spring_security_check

后端 未结 2 1499

I have spring security in place and login via login.jsp works perfectly fine.

Now, I have to automatically get the user logged in based on the URL (similar to Single

2条回答
  •  情书的邮戳
    2021-01-06 00:18

    /j_spring_security_check URL is mapped to UsernamePasswordAuthenticationFilter to serve the requests.

    In UsernamePasswordAuthenticationFilter, by default, the postOnly is set to true.

    The following change in spring-security.xml which sets postOnly to false worked.

    
    

    Also, in web.xml, the following configuration is required:

     springSecurityFilterChain
        /*
        REQUEST
        FORWARD
    
    

提交回复
热议问题