Setting custom Post-Login Destinations based on user ROLES using spring security

后端 未结 1 1522
北恋
北恋 2021-01-16 10:54

I want to set custom Post-Login Destinations based on user ROLES in my application. for example : If a form login isn\'t prompted by an attempt to access a protected resourc

相关标签:
1条回答
  • 2021-01-16 11:05

    In Spring Security 3.0, you can implement a custom AuthenticationSuccessHandler (usually by extending SavedRequestAwareAuthenticationSuccessHandler), and configure <form-login> to use it with authentication-success-handler-ref attribute.

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