spring-从 Windows 域外访问授权服务器时如何禁用登录弹出窗口?
发布时间:2022-08-28 17:54:57 426
相关标签: # 后端
我正在设置一个授权服务器,它使用 Kerberos (SSO) 对 Windows 网络内的用户进行身份验证。并且,它使用基本身份验证来对网络外的用户进行身份验证。
当我尝试使用网络内的机器访问/oauth/authorize端点时,kerberos SSO 可以完美运行,而无需询问我的用户名和密码。但是,当我尝试使用网络外的机器访问同一端点时,会出现浏览器登录弹出窗口并隐藏我的自定义登录页面,直到我单击取消。
我想在访问/oauth/authorize端点时禁用登录弹出窗口。
我的配置:
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.exceptionHandling()
.authenticationEntryPoint(spnegoEntryPoint())
.and()
.authorizeRequests()
.antMatchers("/", "/home", "/check", "/favicon.ico").permitAll()
.anyRequest().authenticated()
.and()
.formLogin()
.loginPage("/login").permitAll()
.and()
.logout()
.permitAll()
.and()
.addFilterBefore(
spnegoAuthenticationProcessingFilter(authenticationManagerBean()),
BasicAuthenticationFilter.class);
}
@Bean
public SpnegoEntryPoint spnegoEntryPoint() {
return new SpnegoEntryPoint("/login");
}
特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报