Class FormLoginConfigurer

java.lang.Object
com.codename1.backend.security.SecurityConfigurer
com.codename1.backend.security.FormLoginConfigurer

public final class FormLoginConfigurer extends SecurityConfigurer

Sign-in through an HTML form.

http.formLogin(form -> form
        .loginPage("/signin")
        .defaultSuccessUrl("/home")
        .permitAll());

With nothing set, the chain serves a plain login page at GET /login, takes the form at POST /login with the fields username and password, sends a signed-in user back to the page that asked -- or to / -- and a refused one to /login?error. Naming a loginPage hands the page to the application: the chain then serves none, and takes the form at that same path.