Привет, у меня есть windows интеграция с активным каталогом, для этого я реализую в своем коде Spring Security и ActiveDirectoryLdapAuthenticationProvider. Все работает нормально, но моя проблема - имя пользователя и пароль, необходимые при первом входе в систему. Есть способ пропустить это? Потому что я уже подключен к windows, и я вызываю свой API, как открыть его из браузера или отправляю запрос на аутентификацию от моего javascript клиента.
@Configuration
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class WebSecurityConfigAD extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().anyRequest().fullyAuthenticated().and().httpBasic();
}
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
ActiveDirectoryLdapAuthenticationProvider adProvider = new ActiveDirectoryLdapAuthenticationProvider(
this.ldapDomain, this.ldapUrl, this.ldapBaseDN);