I am writing a simple CRUD Primefaces webpage as a kind of homework. Before getting into the CRUD page, the user must be authenticated.
I am using the Omega template example as webpage, but I have to write the JavaBean since it is not included in the template. Therefore I started looking for login examples into the forum and I found Login Page topic, where the user asked for login best practices.
merve7 replied:
I have noticed that the mentioned example contains angular stuff, and I think I don't need it for my needs.merve7 wrote: ↑29 Jun 2018, 09:13You can review for example this link ;http://jasonwatmore.com/post/2016/09/29 ... e-tutorial
Since my Primefaces project will never go into production, I can bypass most of security tricks of the example. The only thing I should enforce is that a user cannot open the CRUD webpage without passing before from the login page.
So after having said that, my question is: I am not very used to JSF sessions and scopes, how could I enforce the redirect to the login page, in case an authenticated user tries to access directly to the CRUD page?
Thank you very much