Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何删除基本身份验证的弹出窗口_Java_Spring_Spring Security_Basic Authentication - Fatal编程技术网

Java 如何删除基本身份验证的弹出窗口

Java 如何删除基本身份验证的弹出窗口,java,spring,spring-security,basic-authentication,Java,Spring,Spring Security,Basic Authentication,是否有人知道如何从基本身份验证中“隐藏”弹出消息,而不删除以下一种方式登录的可能性:“事实上,如果服务器发送了WWW身份验证,则浏览器弹出登录消息。从服务器中删除此标题,弹出窗口将不会出现。这样配置spring protected void configure(HttpSecurity http) throws Exception { http .csrf() .and()

是否有人知道如何从基本身份验证中“隐藏”弹出消息,而不删除以下一种方式登录的可能性:“

事实上,如果服务器发送了WWW身份验证,则浏览器弹出登录消息。从服务器中删除此标题,弹出窗口将不会出现。

这样配置spring

protected void configure(HttpSecurity http) throws Exception {

        http
                    .csrf()
                .and()
                    .addFilterAfter(csrfHeaderFilter(), CsrfFilter.class)
                    .exceptionHandling()
                .and()
                    .rememberMe()
                .and()
                    .formLogin()
                    .loginProcessingUrl("/user")   // rest api
                    //.usernameParameter("username")
                    //.passwordParameter("password")
                    .permitAll()
                .and()
                    .logout()
                    //.logoutUrl("/api/logout")
                    //.deleteCookies("JSESSIONID", "CSRF-TOKEN")
                    .permitAll()
                .and()
                    .headers()
                    .frameOptions()
                    .disable()
                    .authorizeRequests()
                    .antMatchers("/login").permitAll()
                    .antMatchers("/#/dashboard/home").permitAll()
                ;



    }

是的,我试过了,但它仍然存在。并使用“working”登录