@FormAuthenticationMechanismDefinition lets the container know that the web application is using form-based authentication. The annotation has one mandatory parameter, loginToContinue, which in turn takes the annotation details of @LoginToContinue. @LoginToContinue can provide details of login and error pages. The client would be sent to a login or error page based on the state of authentication, as follows:
@FormAuthenticationMechanismDefinition(
loginToContinue = @LoginToContinue(
loginPage = "/login.html",
errorPage = "/login-error.html"))
@ApplicationScoped
public class AppConfig{
...
}