class FormIdentityLoginConfigurer extends AbstractHttpConfigurer<FormIdentityLoginConfigurer, HttpSecurity> {
    private final LogoutSuccessHandler logoutSuccessHandler;
    private final LogoutHandler logoutHandler;

    @Override
    public void init(HttpSecurity http) throws Exception {<FILL_FUNCTION_BODY>}
}

        http.formLogin(formLogin -> formLogin
                .loginPage(SecurityConstants.LOGIN_PAGE)
                .loginProcessingUrl(SecurityConstants.OAUTH_LOGIN_PRO_URL)
                .successHandler(new SavedRequestAwareAuthenticationSuccessHandler()))
                .logout(logout -> logout
                        .logoutUrl(SecurityConstants.LOGOUT_URL)
                        .logoutSuccessHandler(logoutSuccessHandler)
                        .addLogoutHandler(logoutHandler)
                        .deleteCookies("JSESSIONID")
                        .clearAuthentication(true)
                        .invalidateHttpSession(true))
                .headers(header -> header
                        // 避免iframe同源无法登录许iframe
                        .frameOptions(HeadersConfigurer.FrameOptionsConfig::sameOrigin))
                .csrf(AbstractHttpConfigurer::disable)
                .sessionManagement(session -> session
                        .sessionCreationPolicy(SessionCreationPolicy.IF_REQUIRED));
    
<no_super_class>