File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
api/src/main/java/io/kafbat/ui/config/auth
contract/src/main/resources/swagger Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 2222@ Slf4j
2323public class BasicAuthSecurityConfig extends AbstractAuthSecurityConfig {
2424
25- public static final String LOGOUT_URL = "/auth?logout" ;
25+ private static final String LOGIN_URL = "/login" ;
26+ private static final String LOGOUT_URL = "/auth?logout" ;
2627
2728 @ Bean
2829 public SecurityWebFilterChain configure (ServerHttpSecurity http ) {
@@ -40,6 +41,10 @@ public SecurityWebFilterChain configure(ServerHttpSecurity http) {
4041 .anyExchange ()
4142 .authenticated ()
4243 )
44+ .formLogin (form -> form
45+ .loginPage (LOGIN_URL )
46+ .authenticationSuccessHandler (authHandler )
47+ )
4348 .logout (spec -> spec
4449 .logoutSuccessHandler (logoutSuccessHandler )
4550 .requiresLogout (ServerWebExchangeMatchers .pathMatchers (HttpMethod .GET , "/logout" )))
Original file line number Diff line number Diff line change @@ -2254,7 +2254,7 @@ paths:
22542254 schema :
22552255 $ref : ' #/components/schemas/AppAuthenticationSettings'
22562256
2257- /auth :
2257+ /login :
22582258 post :
22592259 summary : Authenticate
22602260 requestBody :
You can’t perform that action at this time.
0 commit comments