Преглед на файлове

Implement LDAP logout
Replace the http auth with basic form

Roman Zabaluev преди 2 години
родител
ревизия
3d9f2ba9ea
променени са 1 файла, в които са добавени 9 реда и са изтрити 3 реда
  1. 9 3
      kafka-ui-api/src/main/java/com/provectus/kafka/ui/config/auth/LdapSecurityConfig.java

+ 9 - 3
kafka-ui-api/src/main/java/com/provectus/kafka/ui/config/auth/LdapSecurityConfig.java

@@ -91,16 +91,22 @@ public class LdapSecurityConfig extends AbstractAuthSecurityConfig {
       log.info("Active Directory support for LDAP has been enabled.");
     }
 
-    http
+    return http
         .authorizeExchange()
         .pathMatchers(AUTH_WHITELIST)
         .permitAll()
         .anyExchange()
         .authenticated()
+
+        .and()
+        .formLogin()
+
         .and()
-        .httpBasic();
+        .logout()
 
-    return http.csrf().disable().build();
+        .and()
+        .csrf().disable()
+        .build();
   }
 
 }