Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.

Commit bd0e01b

Browse files
committed
Update WebSecurityConfig.java
1 parent 31c77d5 commit bd0e01b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/com/twilio/accountsecurity/config/WebSecurityConfig.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ public class WebSecurityConfig {
2626
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
2727
http
2828
.addFilterAfter(new TwoFAFilter(), UsernamePasswordAuthenticationFilter.class)
29-
.authorizeHttpRequests((authz) -> authz
30-
.requestMatchers("/protected/**", "/2fa/**").authenticated()
31-
.requestMatchers("/", "/register/**", "/api/**", "/**.js", "/**.html").permitAll()
32-
);
29+
.authorizeRequests()
30+
.requestMatchers("/protected/**", "/2fa/**").authenticated()
31+
.requestMatchers("/", "/register/**", "/api/**", "/**.js", "/**.html").permitAll()
32+
.and().logout().permitAll();
3333
return http.build();
3434
}
3535

0 commit comments

Comments
 (0)