Like form-based authentication, @CustomFormAuthenticationMechanismDefinition provides flexibility to add a custom way of authentication using J2EE technologies, such as JSF, as follows:
@CustomFormAuthenticationMechanismDefinition(
loginToContinue = @LoginToContinue(loginPage = "/login.do"))
@ApplicationScoped
public class AppConfig
{
....
}
We can see that this is similar to the form-based authentication, the only difference is we are specifying a custom server link that is responsible for providing form details and the underlying authentication mechanism.