Two Login Pages with Spring Security | Baeldung
Last modified: February 11, 2017 The Master Class of "Learn Spring Security" is out: 1. Introduction In this tutorial, we will see how we can configure Spring Security to work with two different login pages using two different Spring Security http elements in the configuration. 2. Configuring 2 Http Elements One of the situations in which we may need two login pages is when we have one page for administrators of an application and a different page for normal users. We will configure two http elements that will be differentiated by the URL pattern associated with each: /user* for pages that will need a normal user authentication to be accessed /admin* for pages that will be accessed by an administrator Each http element will have a different login page and a different login processing URL. In order to configure two different http elements, let's create two static classes annotated with @Configuration that extend the WebSecurityConfigurerAdapter.Read full article from Two Login Pages with Spring Security | Baeldung
No comments:
Post a Comment