I'm setting up an authorization server that use Kerberos (SSO) to authenticate users inside windows network. And, it use basic authentication to authenticate users outside network.
When I try access to /oauth/authorize endpoint with a machine inside the network, kerberos SSO works perfectly without asking me for username & password. BUT when i try access to the same endpoint with a machine outside the network a browser login popup appears and hide my custom login page until I click on cancel.
I want to disable login popup when accessing to /oauth/authorize endpoint.
My config:
@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");
}