Skip to content

Apply Spring Security configuration to WebTestClient  #13632

@shortstories

Description

@shortstories

Hi.
In testing codes that applied spring-security, I felt the need for a secure flag.
Checking WebTestClientAutoConfiguration, I could see that customizing is possible by WebTestClientBuilderCustomizer. However, since WebTestClient.Builder.configureClient() has already been called, So I couldn't apply MockServerConfigurer that provided by spring-security.
If possible, it would be best to enable or disable the security option via the secure flag like @AutoConfigureMockMvc. If that's not possible, at least add logic to apply MockServerConfigurer beans.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions