Provide convenience method for applying WebTestClientConfigurer [SPR-15770] #20325
Right now any extension that wants to provide a
client .mutate() .apply(mockPrincipal(() -> "user")) .build() ...
An extension could provide a workaround for this by doing something like this:
withIdentity(client, () -> "user") ...
However, this workaround requires every extension providing the same logic. Additionally, applying multiple extensions becomes a bit difficult to read.
withFooExtension( withIdentity(client, () -> "user"), "foo") ...
Alternatively, it would be nice if something like this were provided:
client .with(mockPrincipal(() -> "user")) ...
Referenced from: commits f5c54f9
The text was updated successfully, but these errors were encountered: