Spring Security: Ignore login page by using a special URL parameter

后端 未结 1 1548
予麋鹿
予麋鹿 2021-02-01 11:23

I currently have a setup that looks something like this:

spring-security.xml:


    

        
1条回答
  •  盖世英雄少女心
    2021-02-01 11:31

    In Spring Security the scenario you want to cover is described in reference manual, chapter Pre-Authentication Scenarios.

    Basically you have to:

    • create custom filter by extending AbstractPreAuthenticatedProcessingFilter or choosing one of its implementations,
    • register custom filter ,
    • implement or choose one of implemented AuthenticationUserDetailsServices,
    • register the service in PreAuthenticatedAuthenticationProvider (with ).

    EDIT: In this answer OP shows his way of implementig custom PRE_AUTH_FILTER.

    0 讨论(0)
提交回复
热议问题