Skip to content

Commit 20726f2

Browse files
committed
test: retain csrf protection in async fixture
1 parent 7696496 commit 20726f2

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/test/java/io/github/sequelcore/vigil/integration/VigilSseDisconnectTomcatIntegrationTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
import org.springframework.http.MediaType;
4444
import org.springframework.lang.Nullable;
4545
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
46-
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
4746
import org.springframework.security.config.http.SessionCreationPolicy;
4847
import org.springframework.security.core.Authentication;
4948
import org.springframework.security.core.context.SecurityContextHolder;
@@ -223,8 +222,7 @@ SecurityFilterChain disconnectSecurityFilterChain(
223222
RequestAttributeSecurityContextRepository repository =
224223
new RequestAttributeSecurityContextRepository();
225224
authenticationFilter.setSecurityContextRepository(repository);
226-
http.csrf(AbstractHttpConfigurer::disable)
227-
.sessionManagement(
225+
http.sessionManagement(
228226
session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
229227
.securityContext(context -> context.securityContextRepository(repository))
230228
.authorizeHttpRequests(authorize -> authorize.anyRequest().authenticated())

0 commit comments

Comments
 (0)