- Java 11
- Jakarta EE 8
- Wildfly 20
I decided to give a try to the new authentication mechanism called "Custom FORM" authentication from Java EE Security that I saw in BalusC's book The Definitive Guide To JSF in Java EE 8.
I created a simple application to test it and it's not working. The problem is that after a successful authentication, I'm not redirected to the welcome page, I keep in the login page. It's as if the application didn't recognize that I'm authenticated.
These are the relevant parts of the relevant files:
(performs a simple authentication)
(the CDI bean)
(the JSF login page)
But when I click on the Enter button I saw that I really get an AuthenticationStatus.SUCCESS, but I'm not redirected to the start.xhtml page, even if I try to change it in the browser address bar manually. It keeps me redirecting to the login page.
if I put this code:
The variable authenticated
Maybe there's just a little thing missing, but I don't know what it is.
Does anyone know what's going on here?
I noticed that I also get this warn in the application server log after login:
I don't know if this has something to do with the problem.