Custom mail customization based on custom ROLES using spring security

I want to set user login addresses based on the ROLES user in my application. for example: If the login to the form is not caused by an attempt to access a protected resource, I want to show different pages based on different roles. using destination URL I cannot do this. How can I do this using Spring Security?

+1
source share
1 answer

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

+5
source

Source: https://habr.com/ru/post/921115/


All Articles